Puzzles 1 to 3
Learn about print function, variables, basic arithmetic, and float division in Python.
We'll cover the following...
Puzzle 1
Let’s start with a basic puzzle that uses the print()
function.
What is the output of the following code?
Note: Your initial Elo rating will be 1000. Enter the output you guessed. Then, press the Run button, and your new Elo will be calculated. Don’t forget to save your Elo rating every time it is updated, as the updated rating will be used in the next puzzle.
Press + to interact
Elo
1000
############################### id 321## Puzzle Elo 527## Correctly solved 86 %#############################print('hello world')
Enter the input below
print()
Via the print()
function, you connect your program to the outside world. This function, as the name indicates, prints a value to the standard output.
What is standard output?
You can think of it as the environment in which your Python program lives. Your standard output is the air around you. Let’s say you shout “Ouch!” Every person in your environment can read from your standard output that you just experienced pain.The data that is printed to the standard output is of type string.
A string is a ...
Access this course and 1400+ top-rated courses and projects.