Instructions
For each prompt, write a short Python code snippet to solve the problem described. Write your code in the
box provided.
1. Create a Variable
Declare a variable named my_age and assign your current age to it. Print the value of my_age.
2. Arithmetic Operations
Create two variables, x and y, with values 15 and 4. Perform and print the following operations:
● Addition
● Subtraction
● Multiplication
● Division
● Modulus
3. User Input: Greeting
Ask the user for their name and print a greeting message, e.g., "Hello, [name]! Welcome to Python
programming!"
4. Simple Calculation
Ask the user to enter two numbers. Multiply the numbers and print the result.
5. Square a Number
Ask the user to enter a number. Calculate the square of that number and display it.
6. Combining Strings
Ask the user to enter their first name and last name. Combine the two into a single string and display it in
the format: "Your full name is [first name] [last name]."
7. Convert Temperature
Ask the user to enter a temperature in Celsius. Convert the temperature to Fahrenheit using the formula:
Fahrenheit = (Celsius * 9/5) + 32
Print the converted temperature.
8. Calculate Remainder
Create a program that asks the user to input two numbers. Calculate and display the remainder when the
first number is divided by the second number.
9. Create and Swap Variables
Create two variables, a and b, and assign any values to them. Write code to swap their values and print the
results before and after swapping.
10. Check Even or Odd
Ask the user to input a number. Write a program to check if the number is even or odd and display the
result.
Bonus Challenge (Optional)
Write a Python script that asks the user to input their hourly wage and the number of hours they worked in a
week. Calculate and display their total earnings for the week.