Worksheet Input and Output in Python
Worksheet Input and Output in Python
Examples
print("Hello, World!")
number = 7
print(number)
Questions
1. Question 1
Create a program that asks the user for their favorite color and prints a message with
that color.
Write your code here.
2. Question 2
Write a program that takes two numbers from the user, subtracts the second number
from the first, and prints the result.
Write your code here.
3. Question 3
Create a program that takes the user's name and age as input. Print a message saying,
"Your name is [name] and you are [age] years old."
Write your code here.
4. Question 4
Write a program that takes two numbers from the user, multiplies them, and prints the
product.
Write your code here.
5. Question 5
Is the following variable name correct? Why or why not?
USER_NAME
Explain your answer.