Answer:
value=int(input("Enter the value from where the user wants to starts: "))#Take the value from the user.
i=1#intialize the value of a variable by 1.
while(value<1000) and (i<9):#while loop which prints the value.
print(value,end=" ")# print the value.
value=value*2#calculate the value to print.
i=i+1#calculate the value for the count.
Output:
If the user enter 5, then the output is : "5 10 20 40 80 160 320 640".
If the user enter 5, then the output is : "3 6 12 24 48 96 192 384".
Explanation: