Discuss / Python / 作业

作业

Topic source

LingByron

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

hello1.py

#!/usr/bin/env python3
#-*- coding:utf-8 -*-
s1 = 72
s2 = 85
r = (s2 - s1)/s1 * 100
print('小明的成绩提升了%.1f%%' % r)

运行结果:

python3 /hello1.py      
小明的成绩提升了18.1%

  • 1

Reply