Discuss / Python / day1-小明成绩提升了多少?

day1-小明成绩提升了多少?

Topic source

十一少

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

s1 = float(input('请输入小明期中考试成绩:'))

s2 = float(input('请输入小明期末考试成绩:'))

n = '小明'

r = (s2-s1)/s1*100

print('小明期末成绩提升了''%.2f' '%%'%r)

print('小明期末成绩提升了{0:.1f}%' .format(r))

print(f'{n}期末成绩提升了{r:.1f}%' )


  • 1

Reply