0

Can any one help me to get rid of this problem... ?

Python program to print cube numbers upto a given number

14th Sep 2020, 4:37 PM
Nandini B N
13 Respostas
+ 2
Can you show your attempt? It's simple Take a input number take a variable for the cube and mark the range till what you want the cube
14th Sep 2020, 4:40 PM
Nilesh
Nilesh - avatar
+ 2
n=int(input()) for i in range(1,n): print(i*i*i)
16th Sep 2020, 11:02 AM
Astha
Astha - avatar
0
Can you tell me the range
14th Sep 2020, 4:41 PM
Nandini B N
0
Suppose if we give the number as 10 I want the cube numbers upto 10 only i.e 1,8 that's it. I don't want beyond that. For that what is the for loop range
14th Sep 2020, 4:45 PM
Nandini B N
0
Thank you Bhavya Sarraf But for input 100 it prints upto 27 only
14th Sep 2020, 5:12 PM
Nandini B N
0
Thank you Bhavya Sarraf
15th Sep 2020, 10:29 AM
Nandini B N
0
n= int(input('Enter a number')) cube = [x**3 for x in range(1,n)] print (cube)
16th Sep 2020, 1:33 PM
Ravi Teja
Ravi Teja - avatar
0
Thank you Ravi Teja
17th Sep 2020, 1:19 AM
Nandini B N
0
Welcome Nandini B N✌️
17th Sep 2020, 1:24 AM
Ravi Teja
Ravi Teja - avatar