Exercises
Introduction
3 tasks. Write the code, press Check, and the page runs it against a real Python interpreter.
Exercise 1Passed
Print the message Hello, world! exactly.
Python
# print the message
print() takes the text in quotes.
print("Hello, world!")Exercise 2Passed
Print three lines: your name, your favourite number, and whether Python is interpreted (True).
Python
# three prints, three lines
Three separate print calls, or one print per line.
print("Ada")
print(7)
print(True)Exercise 3Passed
Use type() to print the type of the value 42.
Python
value = 42
# print its type
print(type(value)) shows the class.
value = 42
print(type(value))