Python编程:从入门到实践
boring
100 000 LinesOfCode
Fear can hold you prisoner.
Hope can set you free.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python编程:从入门到实践 练习答案 Chapter02
2-1message = "sb"print(message)2-2message = "sb"print(message)message = "lnu sucks"print(message)2-3name = "Eric"print("Hello " + name +", would u like to learn some Python today?")2-4name = "george s"print(name.lower())print(name.uppe原创 2021-07-18 23:30:43 · 290 阅读 · 0 评论
-
Python编程:从入门到实践 练习答案 Chapter03
## CHAPTER 033-1names = ['L','H','L','W']print(names[0])print(names[1])print(names[2])print(names[3])3-2names = ['L','H','L','W']print('Hello ' + names[0])print('Hello ' + names[1])print('Hello ' + names[2])print('Hello ' + names[3])3-3co原创 2021-10-30 22:52:56 · 187 阅读 · 0 评论 -
Python编程:从入门到实践 练习答案 Chapter04
4-1pizzas = ['pineapple','sausage','origional']for pizza in pizzas: print(pizza)pizzas = ['pineapple','sausage','origional']for pizza in pizzas: print('I like ' + pizza)pizzas = ['pineapple','sausage','origional']for pizza in pizzas:原创 2021-10-28 09:45:08 · 188 阅读 · 0 评论 -
Python编程:从入门到实践 练习答案 Chapter05
5-1car = 'suzuki'print('Is car == "suzuki"? I predict True')print(car == 'suzuki')car = 'Jaguar'print('Is car == "Jaguar"? I predict False')print(car == 'jaguar')...5-2car = 'suzuki'print('Is car == "suzuki"? I predict True')print(car == 'suzu原创 2021-10-29 23:23:09 · 195 阅读 · 0 评论 -
Python编程:从入门到实践 练习答案 Chapter06
202110306-1person = { 'first_name': 'S', 'last_name': 'G', 'age': 21, 'city': 'SY', }print(person['first_name'])print(person['last_name'])print(person['age'])print(person['city'])6-2nums = { 'CJR': 1, 'SZX': 2原创 2021-10-31 00:48:26 · 417 阅读 · 2 评论 -
Python编程:从入门到实践 练习答案 Chapter07
202111017-1car = input('What kind of car would u like to rent? ')print('Let me see if I can fond u a ' + car)7-2num = int(input('How many people are in your dinner party tonight?: '))if num > 8: print('sorry!there is no more vacant table')e原创 2021-11-01 19:35:47 · 134 阅读 · 0 评论 -
Python编程:从入门到实践 练习答案 Chapter08
202111018-1def display_message(): print("I'm learning Function!")display_message()8-2def favorite_book(name): print('One of my favorite books is ' + name.title())favorite_book('bible')8-3def make_shirt(size, pattern): print('ur size原创 2021-11-01 23:18:19 · 223 阅读 · 0 评论 -
Python编程:从入门到实践 练习答案 Chapter09
202111029-1class Restaurant(): def __init__(self, restaurant_name, cuisine_type): #_init_ (x) self.name = restaurant_name self.type = cuisine_type def describe_restarant(self): print(self.name + ' ' +self.原创 2021-11-02 23:44:33 · 229 阅读 · 0 评论 -
Python编程:从入门到实践 练习答案 Chapter10
9-19-29-19-1utyrrs9-2```javascript9-2原创 2021-11-07 16:15:04 · 429 阅读 · 0 评论 -
Python编程:从入门到实践 练习答案 Chapter11
2021110711-1city_functions.pydef get_city_country(city, country): return city.title() + ', ' + country.title()test_cities.pyimport unittestfrom city_functions import get_city_countryclass CityTestCase(unittest.TestCase): def test_get原创 2021-11-07 23:52:15 · 618 阅读 · 0 评论 -
Python Summary1
print("(If u do not know, just enter 'n')\n\ plz enter the num of the song(s):") OUTPUT:(If u do not know, just enter 'n') plz enter the num of the song(s): print("(If u do not know, just enter '...原创 2021-11-01 21:58:08 · 118 阅读 · 0 评论 -
Python嵌套(列表列表,列表字典,字典字典,字典列表)
列表,字典2 * 2 = 4列表列表,列表字典,字典字典,字典列表,many-users.py3.字典字典(origional)users = {'aeinstein': {'first': 'albert', 'last': 'einstein', 'location': 'princeton'}, 'mcurie': {'first': 'marie',原创 2021-10-31 21:05:48 · 294 阅读 · 0 评论 -
the Zen of Python
1.the zen of pythonBeautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than complicated.Flat is better than nested.Sparse is better than dense.Readability counts.Special cases aren’t specia原创 2021-07-20 08:01:59 · 148 阅读 · 0 评论
分享