جملة التكرار

جملة التكرار


# while loop
x=1

while x<6:
	x+=1
	print("hello")

           
           

#continue in while loop
x=0
while x<10:
	x+=1
	if x==5:
		continue
	print(x)	

  
  
#break in while loop
	while 1==1:
	name = input("enter a name : ")
	if name == "x" :
		break
  
  
  
#else in while loop
x=0
while x<10:
	x+=1
	print(x)	
else :
	print("finished")