Question: In python plz 1) Use for loops to compute the following expression: 1+21+2+31+3+41++624+6251 Round the sum to two decimal places using formatted string. 2) Use
1) Use for loops to compute the following expression: 1+21+2+31+3+41++624+6251 Round the sum to two decimal places using formatted string. 2) Use while loops to perform the following steps: a. Prompt the user to input two integers: firstNum and secondNum. If the secondNum is smaller than firstNum, swap the numbers. b. Output all odd numbers between firstNum and secondNum. c. Output the sum of the square of the odd numbers between firstNum and secondNum. d. Output the odd numbers between firstNum and secondNum, and their squares. Submit one single file. Save the file as a text fite (.txt) Here a sample run: Part 01: 24.00 Part 02: Enter first number 3 Enter second number ? Odd integers between 3 and 7 are: 357 Sum of the squares of edd integers between 3 and 7=83 Odd integers and their square between 3 -aud 7 are: 39 525 749
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
