Question: Problems: Program one or more of the following. 1 point total extra credit. 1. Write a loop that calculates the total of the following sum
Problems: Program one or more of the following. 1 point total extra credit. 1. Write a loop that calculates the total of the following sum of fractional numbers: S30=301+292+283++130 Use a calculator to verify your result. Generalize your program so that the user may input a positive number n and compute the general sum: Sn=i=0n1nii+1=n1+n12+n23++1n Use a while loop to force the user to enter an n value which is indeed positive. Use a for loop to compute the sum. Name your file prefixlab03excr1.py. Copy and paste sample output at bottom of file inside triple apostrophes. Also create a txt file and upload to the Pilot lab 3 Dropbox. 2. Assuming the ocean's level is currently rising at about 1.6 millimeters per year, create an application that displays the number of millimeters that the ocean will have risen each year for the next 25 years. Research online if the 1.6mm/ year is currently correct. Revise your code so that the millimeter rise is an input. Use a for loop to accumulate the total rise. Name your file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
