sytn.net
当前位置:首页 >> 大一python考试题 >>

大一python考试题

def getbmi(heigth, weigth): bmi = round(weigth / heigth ** 2, 2) return bmi num = int(raw_input(u'请输入统计人数:')) students = {} sname = '' sheigth = 0.0 sweigth = 0.0 swaistl = 0.0 sbim = 0.0 result = '' for i in range(num): flag = True while flag:

一般学校非选修课都是有补考的,好好复习准备补考就行呢.如果不幸是选修课,那就只能重修了

高中数学学过啊,朋友import sys'''输入两点,建立直线方程y=kx+b.输入第3点,求点到直线的距离.'''#输入两点p1, p2坐标sys.stdout.write('Input two points:\n')line = sys.stdin.readline()x1, y1, x2, y2 = (float(x) for x in line.split())#计算k,bk = (y2 - y1

3,'earth,mars,venus'4,15,56,17,int(x=0)8,出错,or和and都要小写.9,False完善程序:if n<10:if str(n)[i]>=str(n)[i-1]:

每一行都要递进的缩进去四个空格,我发的时候没注意格式for i in range(7,100,7):for j in range(9,100 - i,9):if (100 - i - j) % 4 == 0:print('第一大题每道小题%d分,第二道大题每道小题%d分,第三道大题每道小题%d分' %(int(i/7),int(j/9),int((100-i-j)/4)))

def DayUp(df):dayup = 1.0for i in range(365):if i % 7 in [5,6,0]:dayup = dayupelse:dayup = dayup*(1+df)return dayupdayfactor = 0.001for i in range(10):print("DayUp: {:.3f}".format(DayUp(dayfactor)))dayfactor += 0.001

def gcd(x, y): s = (x > y) and y or x while (x % s or y % s): s -= 1 return sdef testfunc(n, d): g = gcd(n, d) n, d = n / g, d / g if n

qimiaodingzhi.net | qhgj.net | gtbt.net | 369-e.net | alloyfurniture.com | 网站首页 | 网站地图
All rights reserved Powered by www.sytn.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com