Lists and data structures
jack040610You are going to enhance the prior assignment by doing the following 1) Use list to create a menu2) Create a function the will return the results of the four operations in a dictionary allInOne(n1,n2) Sample output
1) Add two numbers
2) Mult two number
3) Divide
4) Scalc
5) all in one ..
6) …
res=allInOne(5,2)
The results will be return in this format;
res is dictionary {"add":7, "sub":3, "mult":10, "div":2.5)
from res, you are going to print
5 + 2 = 7
5 - 2 = 3
5 * 2 = 10
5 / 2 = 2.5
- 4 years ago
- 30
Answer(1)
Purchase the answer to view it
NOT RATED
- W6_firstname_lastname.py
other Questions(10)
- FIN 486 Week 3 Individual Assignment Long-Term Financial Needs
- FEDERALISM PAPER DUE TODAY AND 11PM
- Review the code of ethics
- Dental Doctor
- ECO 372 Week 2 Individual Fundamentals of Macroeconomics Paper
- intertionational management
- ECE 354 Week 2 DQ 2 ( Analysis of Standardized Testing Reports ) ~ 2 Different Answers ~ A + Work With References
- English Literacy and Language Arts Grades 4 - 5
- BUS 250 Week 5 DQ 2 ( Corporate Philanthropy ) ~ 2 Different Answers ~ A + Tutorial With References
- BUS 250 Week 5 DQ 1 ( Social Media ) ~ 2 Different Answers ~ A + Tutorial With References