Question: Please write a program that has 3 functions: Main() whileLoop() forLoop(x,y,z) The Main function will call the other two functions and return : whileLoop print

Please write a program that has 3 functions:

Main()

whileLoop()

forLoop(x,y,z)

The Main function will call the other two functions and return :

whileLoop print the sum of numbers 1-5

forLoop print the numbers from 1000 to 100 by 100 counting down for example 1000, 900, 800, n.

def main():

print("The sum was: ", whileLoop())

print("The number of iterations was: ", forLoop(,,)

return

if __name__=="__main__": main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!