摘要: import turtle turtle.pensize(数字,画笔宽度 )turtle.pencolor("画笔颜色")turtle.fillcolor("填充颜色") turtle.begin_fill()for i in range(数字,循环次数): turtle.forward(数字,每个 阅读全文
posted @ 2021-09-21 14:37 饭果果 阅读(88) 评论(0) 推荐(0)
摘要: n=eval(input())N=abs(n)a=N+10b=N-10c=N*10if n<0: a=-abs(a) b=-abs(b) c=-abs(c)else: a=abs(a) b=abs(b) c=abs(c)print(N,a,b,c,end="") 阅读全文
posted @ 2021-09-21 14:20 饭果果 阅读(65) 评论(0) 推荐(0)
摘要: s = input()for c in s: if 'a' <= c <= 'z': print(chr(ord('z')-(ord(c)-ord('a'))),end='') elif 'A' <= c <= 'Z': print(chr(ord('Z')-(ord(c)-ord('A'))),e 阅读全文
posted @ 2021-09-14 14:37 饭果果 阅读(91) 评论(0) 推荐(0)
摘要: Str=input("")Left_bracket=0Left_bracket_Z=0Right_bracket_Z=0for i in Str: if i== '(': Left_bracket+=1 elif i== ')': if Left_bracket>0: Left_bracket-=1 阅读全文
posted @ 2021-09-14 14:32 饭果果 阅读(44) 评论(0) 推荐(0)
摘要: s = input()t = ""for c in s: if 'a' <= c <= 'z': t += chr( ord('a') + ((ord(c)-ord('a')) + 3 )%26 ) elif 'A'<=c<='Z': t += chr( ord('A') + ((ord(c)-or 阅读全文
posted @ 2021-09-14 14:21 饭果果 阅读(47) 评论(0) 推荐(0)
摘要: def ifHappy(n): if n==1: print(True) elif 1<n<10: print(False) else: value = str(n) num = 0 for i in range(len(value)): num += int(value[i])**2 ifHapp 阅读全文
posted @ 2021-09-14 14:18 饭果果 阅读(153) 评论(0) 推荐(0)
摘要: N=eval(input())DayUp=pow((1.0+0.001*N),364)DayDown=pow((1.0-0.001*N),364)Ratio=int(DayUp/DayDown)print("{:.2f}, {:.2f}, {:.0f}".format(DayUp,DayDown,R 阅读全文
posted @ 2021-09-13 22:54 饭果果 阅读(70) 评论(0) 推荐(0)
摘要: a=int(input())b=1for i in range(1,a+1): b=b*iprint(format(b)) 阅读全文
posted @ 2021-09-13 21:58 饭果果 阅读(335) 评论(0) 推荐(0)
摘要: str1=input()print(str1[::-1]) 阅读全文
posted @ 2021-09-13 21:28 饭果果 阅读(351) 评论(0) 推荐(0)
摘要: a=float(input())print("{:.3f}".format(a)) 阅读全文
posted @ 2021-09-12 22:46 饭果果 阅读(2542) 评论(0) 推荐(0)