Write a python program that asks user to input a positive


Problem : Write a Python program that asks user to input a positive integer n and prints out certain numbers.

a. Print the first n cubes.

For example, if n = 4, the output is:

1

8

27

64

b. Print perfect cubes < n.

For example, if n = 30, the output is:

1

8

27

c. Print the sum of i**3 for all 1 <= i <= n.

For example, if n = 5, the output is:

225

(Use while loops)

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Write a python program that asks user to input a positive
Reference No:- TGS02897434

Expected delivery within 24 Hours