Answer the question
In order to leave comments, you need to log in
How can I make it so that when I write n the command ends and when I write y it continues?
import time
p = 1
i = 1
y = 1
a = int(input())
while i < 101:
print("Formating /data . . .", i , "%")
i = i+1
time.sleep( 0.1)
print("formatind /data complete")
if a < y:
while p < 101:
print("Removing system. . .", p , "%")
i = i + 1
time.sleep(5)
print( "System deleted! Please restart your device: sm-a115a 32/2")
else:
print('deleting canceled')
Answer the question
In order to leave comments, you need to log in
If I correctly understood the meaning of your program, then you need to do the following
import time
while True:
per = input()
if per == "n":
continue
elif per == "y":
сюда твой код(импорт я прописал выше, его не надо второй раз
else:
pass
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question