6 ответов
+ 2
You could write something like that :
x = 1
while x<= 5000:
print(x)
x *= 2
And it will give you the numbers you want. I set it to 5000 but you can set it to a higher number if you want more numbers.
Tell me if it works
+ 2
a=int(input())
while a<=10000:
print (a)
a=a*2
# it satisfy your conditions till 10000
+ 2
it works. thanks mr hamsdino
+ 1
p=1;
for i in range(10):
print(p);
p=p*2;
+ 1
Look,this is my code
https://code.sololearn.com/cGlcUrMhXX3c/?ref=app
0
# Author: Huub Hoegen
# Date: 22-02-2022
def main(number=2):
Final = [0]
for i in range(10):
Final.append(number << i)
print(Final)
main()