Untitled

mail@pastecode.io avatar
unknown
plain_text
8 months ago
347 B
3
Indexable
Never
#While ciklus

#Feltétel számmal
myNum = int(input("Enter an integer:\n"))
while myNum > 1:
    if myNum % 3 == 0:
        myNum /= 3
    else:
        myNum += 1
    print(myNum)
print(myNum)

#Feltétel logikai értékkel
boolean = True
i = 0
while boolean:
    print(i)
    i += 1
    if i == 50000:
        boolean = False