Question: Here is a problem i have with my python coding class could you help me solve it and explain how it was done?: If the

Here is a problem i have with my python coding class could you help me solve it and explain how it was done?:
If the input is 1,2, or 3, the program works as in the first example, except it calculates and displays
sum, multiple or difference depending on what was chosen. After that, it will display the menu again.
Enter a number: 3
Enter another number: 12
The numbers 3 and 12 were entered.
The multiple of the numbers is 36.
1. Calculate the sum
2. Calculate the difference
3. Calculate multiples
4. Exit the program
Choose an option: 4
If the input is 4, the program stops execution.
If something else is entered, the menu is displayed again.
The program therefore continues execution until the input to the menu is 4.
Try to duplicate the program text as little as possible. If exactly the same program lines occur
more than once, check if it can be skipped.
FYI the first excersise is this:
Write a program that asks the user to enter two numbers, first one, then the other.
Enter a number: 3
Enter another number: 12
Next, the program writes out what the numbers were in one continuous sentence.
The numbers 3 and 12 were entered.
Finally, the program says what the multiple of the numbers is.
The multiple of the numbers is 36.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!