Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Simple use of print function. What will be the output of print("Python!")?
Think about what you expect to see on the screen.
Print two strings. What will be displayed if you run print("AI", "Learning")?
Remember the default separator.
What will print("Hello", "World") output?
Focus on how multiple items are printed.
True or False: The print() function can only display strings.
Consider all the data types we can print.
Write a print statement that takes a name and age and outputs a sentence: 'Your name is [name] and you are [age] years old.'
Use f-strings to include both variables in the output.
Create a print statement that prints: 'Result: A1 + B2 = 5', where A1 and B2 are variables defined as A1 = 3 and B2 = 2.
Incorporate variable values and arithmetic directly in your print statement.
6 more questions in this section. Enroll free to practise them all.
Enroll free