Lesson05

Run Settings
LanguagePython
Language Version
Run Command
for i in range(0,5,1): print('i',i) for j in range(10,5,-1): print ('j',j) for i in range(5): print ('1',i) a=[1,2,3,4,5,6,'x',10,11,12,13] print('a1:',a[::-1]) print("a2:", a[-2:-4:-1]) print('a3:',a[:-2:1], a[:-5:-1]) print('a4:', a[-1:2:-1], a[1:-2:1], a[-3:0:-1]) print('a5:',a[5:2:-1]) b=('hello world') print(b[-3:0:-1], b[1:-2:1]) x= -9 y='hello' if tuple(): print('x is larger then 0') elif x==0: print('x is 0') elif x < 1: if x< -10: print ('x is less then -10') print('x less then 1') else: print('x is less then 0') if y!='hello ': print('y is not number') if print('y is something'): print('SSSSSS') elif x== 1: pass else: print('zzzzzzz') print('this line is out of if block') x=1 while x<10: print(x) x+=1 #x=x+1 break print('end of while loop') print(x) a='aklfknkzxfa' for x in a: if x=='f': y=+1 print(y) # print(x) for i in range(5): print(i) if i==3:print('i is equal to 3') i=6 print ('',i) for y in range(10): for x in range(5,0,-1): # print(y,x) if x==3: continue print(y,x) break continue
Editor Settings
Theme
Key bindings
Full width
Lines