-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmallTest.py
1653 lines (1645 loc) · 39.4 KB
/
smallTest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
目录 ------------------------------------------------------
* 超级马里奥
* 超级马里奥1
* 过河卒
* 求最小的既是质数又是回文数的数
* 求36按某种速率翻一倍所需时间
* 画一条蛇
* 画一条蛇1
* 简单输入输出
* 简单的类型转换、计算
* 数组
* 画叠加正方形
* 画叠加正六边形
* 判断输入
* 绩点判断是否需要补考
* 水果判断是否有货
* 无限输入单词
* 车票收费统计
* 判断字符串是否处理数组中
* 单词本 简单输入输出
* 字典的增删查改
* 单词中英文翻译
* 画小猪佩奇
* 无限输入,直到quit停止
* 无限输入,直到quit停止
* 画同点圆
* 处理,储存一组数据的大于0的奇数、偶数
* 格式化输出
* 数组验证其内容
* 删除数组全部指定字符串
* 单词本插入
* 函数
* 函数引用
* 数组排序
* 二分图
* 类
* 文件操作
* 异常处理
* 数据库处理
* 折线图至html
* 打印每天信息
* pyecharts画热力图
* pyecharts画地图
* 使用pandas读取excel文件
* pyecharts画词云
* pyecharts分析《围城》词云
* 螺旋输出顺序数字
*
*
*
"""
# 超级马里奥
"""
print(" ********")
print(" ************")
print(" ####....#.")
print(" #..###.....##....")
print(" ###.......###### ### ###")
print(" ........... #...# #...#")
print(" ##*####### #.#.# #.#.#")
print(" ####*******###### #.#.# #.#.#")
print(" ...#***.****.*###.... #...# #...#")
print(" ....**********##..... ### ###")
print(" ....**** *****....")
print(" #### ####")
print(" ###### ######")
print("##############################################################")
print("#...#......#.##...#......#.##...#......#.##------------------#")
print("###########################################------------------#")
print("#..#....#....##..#....#....##..#....#....#####################")
print("########################################## #----------#")
print("#.....#......##.....#......##.....#......# #----------#")
print("########################################## #----------#")
print("#.#..#....#..##.#..#....#..##.#..#....#..# #----------#")
print("########################################## ############")
"""
# 超级马里奥1
"""
print(
********
************
####....#.
#..###.....##....
###.......###### ### ###
........... #...# #...#
##*####### #.#.# #.#.#
####*******###### #.#.# #.#.#
...#***.****.*###.... #...# #...#
....**********##..... ### ###
....**** *****....
#### ####
###### ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
########################################## #----------#
#.....#......##.....#......##.....#......# #----------#
########################################## #----------#
#.#..#....#..##.#..#....#..##.#..#....#..# #----------#
########################################## ############
)
"""
# 过河卒
"""
a, b, c, d = input().split()
ha = True
a = int(a)
b = int(b)
c = int(c)
d = int(d)
e = f = n = 0
HaHa = True
list1 = []
list1.append((c, d))
list1.append((c+1, d+2))
list1.append((c+2, d+1))
list1.append((c-1, d-2))
list1.append((c-2, d-1))
list1.append((c-1, d+2))
list1.append((c-2, d+1))
list1.append((c+2, d-1))
list1.append((c+1, d-2))
n, m, j, k = input().split(" ")
zuo = False
you = False
while HaHa:
for i in range(int(n)+int(m)):
if (e+1, f) not in list1 and e != int(n):
zou = True
if (e, f+1) not in list1 and f != int(m):
you = True
if zuo and True:
if i == 11:
n += 1
e = f = 0
"""
# 求最小的既是质数又是回文数的数
"""
import math
def prime(x):
dx = int(math.sqrt(x))
for k in range(2, dx+1):
if x % k == 0:
return 0
return 1
def palindrome(y):
y = str(y)
num = len(y)
for j in range(num//2):
if y[j] != y[num-j-1]:
return 0
return 1
a, b = input().split(" ")
for i in range(int(a), int(b)):
if prime(i) == 1 and palindrome(i) == 1:
print(i)
"""
# 求36按某种速率翻一倍所需时间
"""
import math
t = 0
y = x1 = 36
r = 0.021
num = 72
while y < num:
t += 1
y = x1*math.exp(r*t)
print(t)
"""
# 画一条蛇
"""
import turtle
turtle.setup(650, 350, 200, 200)
turtle.penup()
turtle.fd(-250)
turtle.pendown()
turtle.pensize(25)
turtle.pencolor("purple")
turtle.seth(-40)
for i in range(4):
turtle.circle(40, 80)
turtle.circle(-40, 80)
turtle.circle(40, 80 / 2)
turtle.fd(40)
turtle.circle(16, 180)
turtle.fd(40 * 2 / 3)
turtle.done()
import turtle as t
t.left(45)
t.fd(150)
t.right(135)
t.fd(300)
t.left(135)
t.fd(200)
t.circle(80, -360)
t.seth(-135)
t.fd(300)
t.goto(-100, 100)
"""
# 画一条蛇1
"""
import turtle as t
t.setup(650,350,200,200)
t.penup()
t.goto(-300,-100)
t.pendown()
t.width(25)
t.pencolor("purple")
t.seth(-40)
for i in range(4):
t.circle(40, 80)
t.circle(-40, 80)
t.circle(40, 80/2)
t.fd(40)
t.circle(16, 180)
t.fd(40*2/3)
t.done()
"""
# 简单输入输出
"""
'''
# 输出 hello world!
message = 'hello world!'
print(message)
'''
'''
# 输出 你好
message = '你好'
print(message)
'''
'''
# 输出 圆周长
pi = 3.1415926
meter = 2*pi*5.5
print("圆的周长:", meter)
'''
'''
# 输入你的姓名 输出 问候
name = input("输入你的姓名:")
print(name,",你好!")
'''
'''
# 输出hello的开头大写、全大写、全小写
name = "HeLlo"
print(name.title())
print(name.upper())
print(name.lower())
'''
'''
# 去点前面空格、去掉后面空格、去掉两边空格
name = "HeLlo"
names = "\t"+name+name.title()+"\t"
print(names.lstrip())
print(names.rstrip())
print(names.strip())
'''
"""
# 简单的类型转换、计算
"""
'''
# 数字转换字符串
ha = 3.21312
str(ha)
print(ha)
'''
'''
# 连接输出字符串
print("9/2=",9/2)
print("9//2=",9//2)
print("9**2=",9**2)
'''
'''
# 计算
a = 3
b = 4
r = a*a+b*b
print(r)
'''
'''
# 输出小数
a=float(0.2)
b=float(0.1)
print("a + b = ",float(a+b))
'''
'''
# 输入带说明
name = input("请你输入你的大名(当然,我不建议你说自己是垃圾:")
print(name)
# a = int(input("请输入第一个整数垃圾:"))
# b = int(input("请输入第二个整数垃圾:"))
# print(a + b)
'''
'''
# 格式输出带数字字符串
a = 1233.1415926
print("{:f}".format(a))
'''
'''
# 字符串转换数字
number1 = int(input("混蛋,你的第一个数字是啥,快说:"))
number2 = int(input("垃圾,你的第二个数字是啥,快讲:"))
print("垃圾,这是两个数字之和"+str(number1+number2))
print("垃圾,这是两个数字之差"+str(number1-number2))
print("垃圾,这是两个数字之积"+str(number1*number2))
print("垃圾,这是两个数字之商"+str(number1/number2))
'''
"""
# 数组
"""
'''
# 数组的建立、输出
fruits = ['apple','pear','banana','orange']
print(fruits[0])
scores = [99.5,100,97.5]
print(scores)
ns = ['python',10000,77.5,'加油']
print(ns)
bicycles = ['trek', 'cannonade', 'recline', '捷安特', '凤凰', '永久' ]
print("倒数的索引:")
print(bicycles[-1])
print(bicycles[-3])
print(fruits)
name = []
for i in range(3):
name.append(input())
name.sort()
for i in range(3):
print(name[i])
squares = []
for value in range(1,11):
square = value**2
squares.append(square)
print(squares)
square = [valuer**2 for valuer in range(1,11)]
print(square)
numbers = range(1,6)
print("numbers:", numbers)
num = list(range(20,11,-2))
print("num:",num)
numbers = list(range(10))
print("sum(numbers):", sum(numbers))
print("max(numbers):", max(numbers))
print("min(numbers):", min(numbers))
for ma in mag:
print(ma.title()+',that was a great trick')
print("I can't wait to see your next trick,"+ma.title()+".")
print("Thank you everyone, that was a great magic show!")
print("type(numbers):", type(numbers))
print("numbers内的列表:", list(numbers))
imx = [
[1,2,3],
[4,5,6]
]
print(imx)
players = ['charles', 'martina', 'michael', 'florence', 'eli']
print(players[1:4])
players = ['charles', 'martina', 'michael', 'florence', 'eli']
print("Here are the first three players on my team:")
for player in players[:3]:
print(player.title())
players = ['charles', 'martina', 'michael', '马龙', '孙杨']
# -1是最后一个,-2是倒数第二,-3是倒数第三,...
print("[-2:-1]:", players[-2:-1])
print("[-3: ]:", players[-3:])
print(players[:-2])
'''
'''
# 数组的增删查改排
fruits[1] = 'pineapple'
print(fruits)
fruits.append('watermelon')
print(fruits)
fruits.insert(0,'grapes')
print(fruits)
del fruits[0]
print(fruits)
fruits = fruits.pop()
print(fruits)
fruits = fruits.pop(1)
print(fruits)
fruits.sort()
print(fruits)
print(sorted(fruits))
fruits.sort(reverse=True)
print(fruits)
fruits.reverse()
print(fruits)
print(len(fruits))
# numbers = []
# for i in range(10):
# number = int(input())
# numbers.append(number)
# for i in range(3):
# print(max(numbers))
# numbers.remove(max(numbers))
# friends = ['das','dsa','eye','adv','gsd']
# print(friends[-3:])
# my_foods = ['pizza', 'falasha', 'carrot cake']
# friend_foods = my_foods[:]
# my_foods.append('cannily')
# friend_foods.append('ice cream')
# print("My favorite foods are:")
# print(my_foods)
# print("\nMy friend's favorite foods are:")
# print(friend_foods)
# players = ['charles', 'martina', 'michael', '马龙', '孙杨']
# print("1. players=", players)
# plist = players
# plist.append('姚明')
# print("2. players=", players)
# players = ['charles', 'martina', 'michael', '马龙', '孙杨']
# print("3. players=", players)
# plist = players[:]
# plist.append('姚明')
# print("4. players=", players)
# print("5. plist=", plist)
# my_foods = ['pizza', 'rice', 'milk']
# your_foods = ['口味虾', '红烧肉', '馒头']
# foods = my_foods + your_foods
# print("6. foods=", foods)
# your_foods[0] = '剁椒鱼头'
# print("7. foods=", foods)
# dimensions = [200, 50]
# print("Original dimensions:")
# for dimension in dimensions:
# print(dimension)
# friends = ['罗曼迪康蒂','加里奥','亚索','龙瞎','东方耀','何以琛','徐建国','没毛病','胡打样']
# classmates = friends[:]
# classmates.remove('亚索')
# print(friends)
# print(classmates)
num = (200, 50, 300, 400)
print(num[0])
print(num[1])
cars = ['audi','bmw','subaru','ban']
for car in cars:
if car == 'bmw':
print(car.upper())
else:
print(car.title())
'''
"""
# 画叠加正方形
"""
import turtle as t
t.setup(800, 800)
for i in range(1, 200):
t.forward(2*i)
t.left(90)
for i in range(1, 21, 1):
print(i)
le = [nu for nu in range(3, 31, 3)]
print(le)
ha = [na**3 for na in range(1, 11, 1)]
print(ha)
"""
# 画叠加正六边形
"""
import turtle as t
t.setup(800, 800)
for i in range(1, 201, 1):
t.forward(2*i)
t.left(60)
"""
# 判断输入
"""
# end = input("请输入一个字符串:")
# if end == 'end':
# print("输出的是end。")
# else:
# print("输出的不是end。")
# if end > 'end':
# print("输入的字符串大于end。")
# if end < 'end':
# print("输入的字符串小于end")
"""
# 绩点判断是否需要补考
"""
# score = input("请输入你的绩点:")
# class = input("请输入你的成绩:")
# if float(score) > 3 and float(class) >400:
# print("你被录取了。")
# else:
# print("对不起,你没有被录取。")
# physical = int(input("请输入你的物理成绩:"))
# chemical = int(input("请输入你的化学成绩:"))
# if physical >= 60 and chemical >=60:
# print("你不需要补考。")
# else:
# print("你需要补考。")
"""
# 水果判断是否有货
"""
# fruits = ["apple","banana","pear"]
# fruit = input("顾客提问水果名字是:")
# if fruit in fruits:
# print("有货。")
# if fruit not in fruits:
# print("没货。")
"""
# 无限输入单词
"""
# words = []
# for i in range(1,101):
# word = input("输入的单词是:")
# if word == "停止":
# break
# if word not in words:
# words.append(word)
# print("单词清单:",words)
"""
# 车票收费统计
"""
# sum = 0
# num = int(input("请输入你们的人数:"))
# for i in range(1, num+1,1):
# age = int(input("请输入您的年龄:"))
# if age == 0:
# break
# elif age >=4 and age <18:
# sum+=5
# elif age >=18:
# sum+=10
# print(sum)
"""
# 判断字符串是否处理数组中
"""
available_toppings = ['mushrooms', 'olives', 'green peppers', 'pepperoni', 'pineapple', 'extra cheese']
requested_toppings = ['mushrooms', 'french fries', 'extra cheese']
for requested_topping in requested_toppings:
if requested_topping in available_toppings:
print("Adding " + requested_topping + ".")
else:
print("Sorry, we don't have " + requested_topping + ".")
print("\nFinished making your pizza!")
"""
# 单词本 简单输入输出
"""
# words = []
# for i in range(1,5,1):
# word = input("请输入单词:")
# if word not in words:
# words.append(word)
# ban = words[:]
# for i in ban:
# print(i)
# print("请问你记住了吗?")
# answer = input()
# if answer.lower() == "y":
# words.remove(i)
# print(words)
"""
# 字典的增删查改
"""
word_dict = {
'name':'名字',
'python':'蟒蛇',
'dictionary':'字典',
'list':'列表',
'variable':'变量',
'class':'类',
'object':'对象'
}
contacts = {
'马云': '13309283335',
'赵龙': '18989227822',
'张敏': '13382398921',
'乔治': '19833824743',
'乔丹': '18807317878',
'库里': '15093488129',
'韦德': '19282937665'
}
name = input()
print(contacts[name])
contacts['耶稣'] = '12345678910'
del contacts['马云']
for name,phone in contacts.items():
print(name + ":" + phone)
for name in contacts.keys():
print(name)
for phone in contacts.values():
print(phone)
contacts = {
'马云': {'phone':'13309283335','address':'南校'},
'赵龙': {'phone':'18989227822','address':'北校'}
}
print(contacts['马云']['address'])
contacts = {
'马云': ['13309283335', '13863381383'],
'赵龙': ['18989227822']
}
print(contacts['马云'][1])
words = {
'apple':['苹果','牛气'],
'banana':'香蕉',
'pear':'梨'
}
"""
# 单词中英文翻译
"""
for i in range(1,101,1):
e = input('请输入需要增加的英文:')
if e == 'end':
break
c = input('请输入对应的中文:')
words[e] = c
words1 = words.copy()
for e,c in words1.items():
print(e + ":" + c)
answer = input("请问你记住了吗?(回复y/n):")
if answer == "y":
del words[e]
print(words)
for i in range(1,101,1):
answer = input("请输入你想要查找的英文翻译:")
if answer == "end":
break
if answer not in words1.keys():
print("单词表没有这个单词。")
else:
print(answer + "该单词的中文翻译是:" + words1[answer])
for i in range(1,101,1):
sum=0
c = input("请输入你想要翻译的中文:" )
if c == "停止":
break
else:
for eh,ch in words.items():
if len(ch) == 1:
if ch == c:
print(eh)
sum=1
elif len(ch) > 1:
if c in ch:
print(eh)
sum=1
if sum==0:
print("对不起,没有这组单词。" )
"""
# 画小猪佩奇
"""
# # coding:utf-8
# import turtle as t
# # 绘制小猪佩奇
# # =======================================
#
# t.pensize(4)
# t.hideturtle()
# t.colormode(255)
# t.color((255, 155, 192), "pink")
# t.setup(840, 500)
# t.speed(50)
#
# # 鼻子
# t.pu()
# t.goto(-100,100)
# t.pd()
# t.seth(-30)
# t.begin_fill()
# a = 0.4
# for i in range(120):
# if 0 <= i < 30 or 60 <= i < 90:
# a = a+0.08
# t.lt(3) # 向左转3度
# t.fd(a) # 向前走a的步长
# else:
# a = a-0.08
# t.lt(3)
# t.fd(a)
# t.end_fill()
#
# t.pu()
# t.seth(90)
# t.fd(25)
# t.seth(0)
# t.fd(10)
# t.pd()
# t.pencolor(255, 155, 192)
# t.seth(10)
# t.begin_fill()
# t.circle(5)
# t.color(160, 82, 45)
# t.end_fill()
#
# t.pu()
# t.seth(0)
# t.fd(20)
# t.pd()
# t.pencolor(255, 155, 192)
# t.seth(10)
# t.begin_fill()
# t.circle(5)
# t.color(160, 82, 45)
# t.end_fill()
#
# # 头
# t.color((255, 155, 192), "pink")
# t.pu()
# t.seth(90)
# t.fd(41)
# t.seth(0)
# t.fd(0)
# t.pd()
# t.begin_fill()
# t.seth(180)
# t.circle(300, -30)
# t.circle(100, -60)
# t.circle(80, -100)
# t.circle(150, -20)
# t.circle(60, -95)
# t.seth(161)
# t.circle(-300, 15)
# t.pu()
# t.goto(-100, 100)
# t.pd()
# t.seth(-30)
# a = 0.4
# for i in range(60):
# if 0 <= i < 30 or 60 <= i <90:
# a = a+0.08
# t.lt(3) # 向左转3度
# t.fd(a) # 向前走a的步长
# else:
# a = a-0.08
# t.lt(3)
# t.fd(a)
# t.end_fill()
#
# # 耳朵
# t.color((255, 155, 192), "pink")
# t.pu()
# t.seth(90)
# t.fd(-7)
# t.seth(0)
# t.fd(70)
# t.pd()
# t.begin_fill()
# t.seth(100)
# t.circle(-50, 50)
# t.circle(-10, 120)
# t.circle(-50, 54)
# t.end_fill()
#
# t.pu()
# t.seth(90)
# t.fd(-12)
# t.seth(0)
# t.fd(30)
# t.pd()
# t.begin_fill()
# t.seth(100)
# t.circle(-50, 50)
# t.circle(-10, 120)
# t.circle(-50, 56)
# t.end_fill()
#
# #眼睛
# t.color((255, 155, 192), "white")
# t.pu()
# t.seth(90)
# t.fd(-20)
# t.seth(0)
# t.fd(-95)
# t.pd()
# t.begin_fill()
# t.circle(15)
# t.end_fill()
#
# t.color("black")
# t.pu()
# t.seth(90)
# t.fd(12)
# t.seth(0)
# t.fd(-3)
# t.pd()
# t.begin_fill()
# t.circle(3)
# t.end_fill()
#
# t.color((255, 155, 192), "white")
# t.pu()
# t.seth(90)
# t.fd(-25)
# t.seth(0)
# t.fd(40)
# t.pd()
# t.begin_fill()
# t.circle(15)
# t.end_fill()
#
# t.color("black")
# t.pu()
# t.seth(90)
# t.fd(12)
# t.seth(0)
# t.fd(-3)
# t.pd()
# t.begin_fill()
# t.circle(3)
# t.end_fill()
#
# # 腮
# t.color((255, 155, 192))
# t.pu()
# t.seth(90)
# t.fd(-95)
# t.seth(0)
# t.fd(65)
# t.pd()
# t.begin_fill()
# t.circle(30)
# t.end_fill()
#
# # 嘴
# t.color(239, 69, 19)
# t.pu()
# t.seth(90)
# t.fd(15)
# t.seth(0)
# t.fd(-100)
# t.pd()
# t.seth(-80)
# t.circle(30, 40)
# t.circle(40, 80)
#
# # 身体
# t.color("red", (255, 99, 71))
# t.pu()
# t.seth(90)
# t.fd(-20)
# t.seth(0)
# t.fd(-78)
# t.pd()
# t.begin_fill()
# t.seth(-130)
# t.circle(100,10)
# t.circle(300,30)
# t.seth(0)
# t.fd(230)
# t.seth(90)
# t.circle(300,30)
# t.circle(100,3)
# t.color((255,155,192),(255,100,100))
# t.seth(-135)
# t.circle(-80,63)
# t.circle(-150,24)
# t.end_fill()
#
# # 手
# t.color((255,155,192))
# t.pu()
# t.seth(90)
# t.fd(-40)
# t.seth(0)
# t.fd(-27)
# t.pd()
# t.seth(-160)
# t.circle(300,15)
# t.pu()
# t.seth(90)
# t.fd(15)
# t.seth(0)
# t.fd(0)
# t.pd()
# t.seth(-10)
# t.circle(-20,90)
#
# t.pu()
# t.seth(90)
# t.fd(30)
# t.seth(0)
# t.fd(237)
# t.pd()
# t.seth(-20)
# t.circle(-300,15)
# t.pu()
# t.seth(90)
# t.fd(20)
# t.seth(0)
# t.fd(0)
# t.pd()
# t.seth(-170)
# t.circle(20,90)
#
# # 脚
# t.pensize(10)
# t.color((240,128,128))
# t.pu()
# t.seth(90)
# t.fd(-75)
# t.seth(0)
# t.fd(-180)
# t.pd()
# t.seth(-90)
# t.fd(40)
# t.seth(-180)
# t.color("black")
# t.pensize(15)
# t.fd(20)
#
# t.pensize(10)
# t.color((240, 128, 128))
# t.pu()
# t.seth(90)
# t.fd(40)
# t.seth(0)
# t.fd(90)
# t.pd()
# t.seth(-90)
# t.fd(40)
# t.seth(-180)
# t.color("black")
# t.pensize(15)
# t.fd(20)
#
# # 尾巴
# t.pensize(4)
# t.color((255, 155, 192))
# t.pu()
# t.seth(90)
# t.fd(70)
# t.seth(0)
# t.fd(95)
# t.pd()
# t.seth(0)
# t.circle(70, 20)
# t.circle(10, 330)
# t.circle(70, 30)
# t.done()
"""
# 无限输入,直到quit停止
"""
# message = input("-->")
# while message != "quit":
# print('a str')
# message = input("-->")
# print("bye")
"""
# 无限输入,直到quit停止
"""
# while True:
# message = input("-->")
# if message == "quit":break
# print(message)
# print("bye")
"""
# 画同点圆
"""
import turtle as turtle
turtle.setup(300, 500)
i = 1
step = 5
draw = True
while draw:
turtle.circle(step*i)
i = i + 1
if i > 100:
draw = False
if step*i > 30:
draw = False
"""
# 处理,储存一组数据的大于0的奇数、偶数
"""
ss = ['2','3','4','5','-3','-5','6','23']
evens = []
odds = []
for s in ss:
n = int(s)
if n < 0:
continue
if n % 2 == 0:
evens.append(n)
else:
odds.append(n)
print(evens)
print(odds)
print(ss)
"""
# 格式化输出
"""
i = 0
while i < 5:
j = 0
while j < 5:
print("*", end="")
j = j + 1
i = i + 1
print()
"""
# 数组验证其内容
"""
unconfirmed_users = ['alice', 'brian', 'candace']
confirmed_users = []
while unconfirmed_users: