码迷,mamicode.com
首页 > 其他好文 > 详细

分数代码

时间:2019-01-18 12:27:27      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:password   style   比较   als   lag   人间   +=   ==   lse   

score = int(input("输入分数:"))

if score > 100:
    print("最高分才100...")
elif score >= 90:
    print("A")
elif score >= 60:
    print("C")
elif score >= 80:
    print("B")
elif score >= 40:
    print("D")
else:
    print("太笨了...E")

比较分数

name = input(请输入名字:)
age = input(请输入年龄:)

if name == 小二:
    if age == 18:
        print(666)
    else:
        print(333)
else:
    print(错了....)

if条件判断

print(111)
while True:
    print(我们不一样)
    print(在人间)
    print()
print(222)

while 从一加到一百

count = 1
flag = True
#标志位
while flag:
    print(count)
    count = count + 1
    if count > 100 :
        flag = False


count = 1
while count <= 100:
    print(count)
    count = count + 1


count = 1
sum = 0

while count <= 100:
    sum = sum + count 
    count = count + 1
    
print(sum)
print(11)
while True:
    print(222)
    print(333)
    break
    print(444)
print(abc)

count = 1
while True:
    print(count)
    count = count + 1
    if count > 100:break




print(111)
count = 1
while count < 20 :
    print(count)
    continue
    count = count + 1
i = 0
while i < 3 :
        username = input(输入用户名: )
        password = int(input(输入密码))
        if username == kkk and password == 123:
                print (登录成功)
        else:
                print (登录失败重新登录)
        i += 1

三次登录帐号密码

count = 0
while count <= 100 : 
    count += 1
    if count > 5 and count < 95: 
        continue 
    print("loop ", count)

print("-----out of while loop ------")

 

分数代码

标签:password   style   比较   als   lag   人间   +=   ==   lse   

原文地址:https://www.cnblogs.com/li105803859/p/10286628.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!