- 博客(6)
- 收藏
- 关注
原创 4.25python Leetcode 45
45. Jump Game IIGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.You...
2018-04-30 23:20:27 334
原创 4.23python Leetcode array 41
Leetcode41. First Missing PositiveGiven an unsorted integer array, find the smallest missing positive integer.Example 1:Input: [1,2,0]Output: 3Example 2:Input: [3,4,-1,1]Output: 2Example 3:Input: ...
2018-04-29 22:01:16 159
原创 4.9python作业
# 11-1city_funcitons.pydef city_function(city, country): return city + ', ' + countryimport unittestfrom city_functions import city_functionclass TestCityFunction(unittest.TestCase): def te...
2018-04-15 14:26:32 230
原创 4.4python作业
# 10-4file_name = 'guest_book.txt'with open(file_name, 'a') as file: while(True): name = input("Please enter your name:") if(name == 'quit'): break file.writ...
2018-04-08 12:39:15 145
原创 4.2python作业
# 9-1 & 9-4class Restaurant(): def __init__(self, name, type_): self.restaurant_name = name self.cuisine_type = type_ self.number_served = 0 def describe_restaura...
2018-04-04 20:38:13 229
原创 3.28python作业
# 8-2def favorite_book(book_name): print("One of my favorite book is "+ book_name)favorite_book('Sherlock')# 8-5def describe_city(city, country = 'China'): print(city + " is in " + coun...
2018-04-01 14:31:08 154
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人