摘要: #练习1 y = 1for i in range (10): x = 2 * (y + 1) y = xprint (y) #练习2 n = int(input ('输入行数:'))k = int(input ('输入列数:'))a = [1]b = [1,1]count = 1while coun 阅读全文
posted @ 2020-04-05 15:01 neilqu 阅读(104) 评论(0) 推荐(0)
摘要: 注释: # 数字:<1>整数:(1)int (2)16进制:0xa 8进制:0o7 2进制:0b10 (3)bool型:True(1)和False(0) <2>浮点数:(1)1.2, 3.1415, -0.12, 1.46e9 (2)本实质上使用了C语言的double类型 <3>复数:1+2j <4 阅读全文
posted @ 2020-03-23 20:27 neilqu 阅读(108) 评论(0) 推荐(0)
摘要: #作业1a = 1b = 1while a < 10: if a > b: c = a * b d = f'{a}x{b}={c}' print (d,end = ';\t') b += 1 elif a == b: c = a * b d = f'{a}x{b}={c}' print (d,end 阅读全文
posted @ 2020-03-23 12:57 neilqu 阅读(146) 评论(0) 推荐(0)
摘要: #练习1r = input ('半径为:')R = int (r)a = 3.14 * (R ** 2) #面积s = 2 * 3.14 * R #周长print ('对应圆的面积为:',end = '\t')print (round (a,2))print ('对应圆的周长为:',end = '\ 阅读全文
posted @ 2020-03-23 12:54 neilqu 阅读(176) 评论(0) 推荐(0)