摘要:
000-- the way to define a string with several lines 001--to get specific letters from a string 002-- the common error message for new beginner while r 阅读全文
摘要:
000--functions for Tuple(the highlight ones) VS functions for List 001-- add one more tuple to original one with only 1 element, you need you use '' a 阅读全文
摘要:
000-- List comprehensions Above one is equal to : for the first one, it's equal to : 001-- list functions: list.sort() list.reverse() == list.sort(rev 阅读全文
摘要:
List Slice 001-- to read specific elements in the list 001-- the difference between list2=list1[:] and list3=list1 阅读全文
摘要:
00-- print every 2 members in the list : 001--print the members with index in the list: 002-- the difference between append(), extend(), insert() : ht 阅读全文
摘要:
01--Password verification 002- sort the number which equal to its own number's cubic 003--combination of different color balls : Note: 1-- break only 阅读全文
摘要:
0-- print A/B/C/D rather than detail score: score = float(input('please input your score: ')) if score>=90: print('A')elif 80<=score<90: print('B')eli 阅读全文
摘要:
0- print all the odds in range 0-100: for i in range (101): if i%2!=0: print(str(i)) 1-- Einstein conundrum: for i in range (10000): if i%2==1 and i%3 阅读全文
摘要:
0--Update the small game to check the type of the guess import random answer = random.randint(1,10) guess = input('please input your guess: ' ) i=2 wh 阅读全文
摘要:
0 small games: number guess: import random answer = random.randint(1,10) guess = int(input('please input your guess: ' )) i = 2 while i : if guess != 阅读全文