Question
Solve the following in python (Anaconda spider version 3 or above). 1. Write a program that prints out the results of at least one calculation
Solve the following in python (Anaconda spider version 3 or above).
1. Write a program that prints out the results of at least one calculation for each of the basic operations: addition, subtraction, multiplication, division, and exponents.
2. Find a calculation whose result depends on the order of operations. Print the result of this calculation using the standard order of operations.Use parentheses to force a nonstandard order of operations. Print the result of this calculation.
3. On paper, 0.1+0.2=0.3. But you have seen that in Python, 0.1+0.2=0.30000000000000004. Find at least one other calculation that results in a long decimal like this.
4. Store the results of at least 5 different calculations in separate variables. Make sure you use each operation at least once. Print a series of informative statements, such as "The result of the calculation 5+7 is 12."
5. Take your work for question 4. Instead of just printing the results, print an informative summary of the results. Show each calculation that is being done and the result of that calculation. Explain how you modified the result using parentheses.
6. On paper, 0.1+0.2=0.3. But you have seen that in Python, 0.1+0.2=0.30000000000000004. Find a number of other calculations that result in a long decimal like this. Try to find a pattern in what kinds of numbers will result in long decimals.
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