Question
Python Write a program which gives the option between doing 3 things: 1) Add two numbers 2) Multiply three numbers 3) Multiply a number and
Python
Write a program which gives the option between doing 3 things:
1) Add two numbers
2) Multiply three numbers
3) Multiply a number and a string
Ask the user to choose an option. Output Invalid option if the user enters something apart from 1, 2 or 3. Otherwise depending on what the user enters ask the user again for inputs to perform the required choice and output the answer.
Sample program output 1: You can choose between: 1) Adding two numbers 2) Multiplying three numbers 3) Multiplying a number and a string Please choose an option: 2 Please enter number 1: 2 Please enter number 2: 3 Please enter number 3: 5 The answer is 30
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started