1.结构
s = 6
if s>60:
print('及格')
else:
print('不及格')
print('退出')
s = 6
if s>60:
print('及格')
else:
print('不及格')
print('退出')
s = 86
a = 68
if s > 80 and a > 80:
print('优秀')
else:
print('不优秀')
s = 86
a = 68
if (80 <= a < 90) or (80 <= s < 90):
print('良好')
count = 100
while count > 0:
print('好好学习')
count -= 1
count = 100
while count > 0:
print('好好学习')
if count == 99:
break
count -= 1
count = 100
while count > 0:
print('好好学习')
if count % 2 == 0:
continue
count -= 1
count = 100
while count > 0:
print('好好学习')
count -= 1
else:
print('程序结束')
name = 'zhangsan'
for i in name:
print(i)
for i in range(1,20,2):
print(i,end=' ')
print()
import random
num = random.randint(5,10)
print(num)
|