Question: 2. Write a script that prints the first 10 cube numbers (x**3), starting with x=1 and ending with x=10. 1 print() 3. Write a script

 2. Write a script that prints the first 10 cube numbers

2. Write a script that prints the first 10 cube numbers (x**3), starting with x=1 and ending with x=10. 1 print() 3. Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that aren't multiples of 7. Remember that is also a multiple of 7. 1 print() 4. The retry function tries to execute an operation that might fail, it retries the operation for a number of attempts. Currently the code will keep executing the function even if it succeeds. Modify the code so that it stops trying after the operation succeeded. 1-def retry(operation, attempts): 2. for n in range(attempts): 3- if operation(): print("Attempt " + str(n) + " succeeded") else: print("Attempt " + str(n) + " failed") 7 8 9 retry(create_user, 3) retry (stop service, 5)

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!