自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 第八周作业 LeetCode 选做 两题

35. 搜索插入位置题目描述:给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。你可以假设数组中无重复元素。class Solution(object): def searchInsert(self, nums, target): first = 0 last...

2018-04-25 22:59:05 218

原创 第六周作业 第11章选做

11.1import unittest def city_functions(city, country): return city.title() + ', ' + country.title() class Test(unittest.TestCase): def test_city_country(self): c_c = city_functions(...

2018-04-16 00:07:14 109

原创 第五周作业b 第10章选做(1、2、4、8)

10.1with open("learning_python.txt")as fob: print("print_1:") data=fob.read() print(data) print("print_2:") fob.seek(0,0) for line in fob: print(line.strip()) print("print_3:") fob.seek(...

2018-04-06 15:01:31 130

原创 第五周作业a 第9章选做(1、2、6、10)

9-1#9.1 class Restaurant(): def __init__(self,name,cuisine_type): self.name=name self.cuisine_type=cuisine_type def describe_restaurant(self): print("The restaurant's name is "+self.name+ ".")...

2018-04-06 00:20:42 128

原创 第四周作业b 第8章选做(1、3、7、8)

8-1def display_message(message): print(message) mess=input("Input a message and it will be displayed:") display_message(mess) 8-3def make_shirt(size,message): print("The shirt will be made with the ...

2018-04-01 15:52:01 120

原创 第四周作业a 第7章选做(2、5、6、8)

7-2number=int(input("How many people will have a meal?:")) if number>8: print("There is no empty table for so many people.") else: print("There is an empty table.") 7-5/6flag=True while(flag): a...

2018-04-01 14:37:03 115

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除