![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
周小馬
这个作者很懒,什么都没留下…
展开
-
Python编程:从入门到实践(课后习题3)
# 3-1 姓名 names = ['Zhou Kai', 'Zhang Lili', 'Liu Jie', 'Zhou Ting', 'Zhou Jing'] for i in names: print(i) # 3-2 问候语 names = ['Zhou Kai', 'Zhang Lili', 'Liu Jie', 'Zhou Ting', 'Zhou Jing'] for i in n原创 2017-09-19 10:57:09 · 2501 阅读 · 1 评论 -
scikit-learn 梯度提升树(GBDT)调参小结
转:http://www.cnblogs.com/pinard/p/6143927.html 在梯度提升树(GBDT)原理小结中,我们对GBDT的原理做了总结,本文我们就从scikit-learn里GBDT的类库使用方法作一个总结,主要会关注调参中的一些要点。 1. scikit-learn GBDT类库概述 在sacikit-learn中,GradientBoo转载 2017-09-20 17:54:42 · 618 阅读 · 0 评论 -
Python编程:从入门到实践(课后习题7)
# 7-1 汽车租 car = input("What kind of car do you want to rent: ") print("Let me see if I can find you a " + car.title()) # 7-2 餐馆订位 restaurant = int(input("How many people are dining: ")) if restaurant原创 2017-09-19 11:04:07 · 5123 阅读 · 6 评论 -
Python编程:从入门到实践(课后习题9)
# 10-6 加法运算 first_number = input("First number: ") second_number = input("Second number: ") try: add = int(first_number) + int(second_number) except ValueError: print("You must enter digits!!!") els原创 2017-09-19 11:07:06 · 8839 阅读 · 0 评论 -
Python编程:从入门到实践(课后习题10)
# 10-6 加法运算 first_number = input("First number: ") second_number = input("Second number: ") try: add = int(first_number) + int(second_number) except ValueError: print("You must enter digits!!!") els原创 2017-09-19 11:08:31 · 3453 阅读 · 1 评论 -
Python编程:从入门到实践(课后习题11)
# 11-1 城市和国家 # city_functions.py def city_country(city, country): city = city country = country cc = city + ' ' + country return cc.title() # test_cities.py import unittest from city_functions im原创 2017-09-19 11:07:43 · 1415 阅读 · 2 评论 -
Python编程:从入门到实践(课后习题8)
# 8-1 消息 def display_message(): print("This chapter I will learning function.") display_message() # 8-2 喜欢的图书 def favorite_book(title): print("One of my favorite books is " + title + ".") favorit原创 2017-09-19 11:05:38 · 7533 阅读 · 2 评论 -
Python编程:从入门到实践(课后习题6)
# 6-1 人 name = { 'first_name': 'lili', 'last_name': 'zhang', 'age': 18, 'city': 'guangzhou' } print(name['first_name'] + ', ' + name['last_name'] + ', ' + str(name['age']) + ', ' + name['city原创 2017-09-19 11:03:26 · 3738 阅读 · 1 评论 -
Python编程:从入门到实践(课后习题5)
# 5-3 外星人颜色#1 alien_color = 'green' if alien_color == 'green': print('You get 5 point.') alien_color = 'yellow' if alien_color == 'green': print('You get 5 point.') # 5-4 外星人颜色#2 alien_color = 'yel原创 2017-09-19 11:02:12 · 5112 阅读 · 9 评论 -
Python编程:从入门到实践(课后习题4)
# 4-1 比萨 pizzas = ['seafood', 'sausage', 'cheese'] for i in pizzas: print(i) for i in pizzas: print('I like ' + i + ' pizza') # 4-1-1 for i in pizzas: print('I like ' + i + ' pizza') pr原创 2017-09-19 11:01:33 · 5559 阅读 · 0 评论 -
fatal error: Python.h: 没有那个文件或目录 解决方法
这几天安装scrapy 先说下环境 虚拟机Ubuntu16.04 系统默认Python 2.7.12 ,系统还自带3.5版本的,后来自己又装了3.6版本。 在系统安装过程中,总是到twisted时报错,因为是源码安装的,所以系统要进行编译,但是找不到python.h文件!!! 报错如下 creating build/temp.linux-x86_64-2.7/sr原创 2017-12-26 10:01:00 · 37046 阅读 · 4 评论