Solution - Build a simple calculator app
Here's an example program you can use to guide your work.
Remember to return numbers from the
inputfunction you have to convert the string to a numeric value using either
float. Here we're using
intbut either conversion would be fine.
Also, to output the numbers in a string, you have to use the
strfunction to convert them to a string so you can concatenate the results.
# Read the first number x = int(input('Enter the first number: ')) # Get the second number y = int(input('Enter the second number: ')) # Add them together result = x + y # Display the results print(str(x) + " + " + str(y) + " = " + str(result))