Discuss / Python / 作业

作业

Topic source

海歌

#1 Created at ... [Delete] [Delete and Lock User]
作业

#成绩提升率,cj.py

name=input('请输你的姓名:')

print(name,"你好")

last=int(input("请输入你去年的期末数学成绩:"))

today=int(input("请输入你今年的期末数学成绩:"))

top=(today-last)/last*100

print('%s,你的今年期末数学成绩比去年提升了%.2f%%'%(name,top))

is_true=today<last

if is_true:

    print('你今年的成绩考的比去年差%s分,你要加倍努力啦' %(last-today))

else:

    print('你今年的成绩比去年有所进步,祝贺你!!!')


  • 1

Reply