QUESTION IMAGE
Question
karen wants to create a program that will allow the user to input their age. which of these lines of code should be used?
a. print(\what is your age?\)
b. age = (\what is your age?\)
c. age = input(\what is your age?\)
d. age = ask(\what is your age?\)
To get user input for age, the input() function in Python is used to prompt and receive user input. Option A just prints the message, Option B assigns a string to age (not input), Option D uses a non - existent ask() function. Option C uses input() with the prompt "What is your age?".
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
C. age = input("What is your age?")