Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the output of print('Hello, World!')?
It's a basic greeting message.
If name = 'Alice', what does print('Name:', name) display?
It's showing the stored name variable.
What will print('Hello' + ' ' + 'World') output?
Think about how strings combine.
Is the following statement true? print('Age is ' + str(age)) correctly shows the value of age.
Remember data types when combining!
You have variables: username = 'Jane' and score = 88. Write a print statement that uses both variables in a meaningful sentence.
Use f-string to include variables within a sentence.
What would happen if you try to print a string and an integer directly using print('I am ' + age)?
Think about the compatibility of the types.
5 more questions in this section. Enroll free to practise them all.
Enroll free