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.
Write a line of code to take input for age from the user.
Use input() with a prompt.
How do you display a welcome message using the user's name?
Think about string concatenation.
What is the function used to take user input in Python?
Think about how users provide data.
Does print() allow for multiple arguments?
Remember the examples with different print usage.
Create a simple interactive program that asks three questions: the user's name, favorite color, and age. It should then print a sentence summarizing the user's responses.
Use f-strings for formatted output.
Write a program that asks the user for their birth year and calculates their age, then prints a personalized birthday greeting.
Remember to convert the input to an integer for calculation.
6 more questions in this section. Enroll free to practise them all.
Enroll free