Exercise
Calculator Exercise 1: Get User Input
In this exercise, you’ll start building your calculator project. In this first step, we will get input from the user to use in calculations.
Task
Write a Python program that:
- Asks the user for the first number and stores it in
num1 - Asks the user for the second number and stores it in
num2 - Prints both numbers to confirm the inputs
Hint
- Use the
input()function to get user input - Remember that
input()returns a string. You can convert it tointorfloatif needed later
Example Output