tengyue的成绩

in #python-study7 years ago

tengyue的成绩

tengyue的成绩从去年的60分提升到了今年的90分,请计算小明成绩提升的百分点,并用字符串格式化显示出'xx.x%',只保留小数点后1位。

代码:

#! /usr/bin/env python3
# -*- coding: utf8 -*-

name = input('plz input your name: ')
lys = int(input('plz input your last year score: '))
tys = int(input('plz input your this year score: '))

per =  (tys - lys)/lys*100

print('%s 的成绩较去年提高了: %.1f%%' % (name, per))

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 58906.05
ETH 2666.51
USDT 1.00
SBD 2.44