【Python爬虫】-《笨办法学 Python》练习

零基础学习python第一课,感谢程程老师!

习题0

程程老师帮助指导安装

习题1

print("hello word!")
print("hello Again")
print("I link typing this")
print("this is fun.")
print("yay! printing.")
print("I'd much rather you 'not'.")
print('I "said" do not touch this.\n')

习题2

# A comment,this is so you can read your program later.
# Anything after the # is ignored by python.

习题3

print("this will run.\n")

print("I will now count my chickens:")
print("hens",25+30/6)
print("roosters",100-25*3%4)
print("Now I will count the eggs")
print(3+2+1-5+4% 2-1/4+6)
print("Is it true that 3+2<5-7?")
print(3+2<5-7)
print("what is 3+2?",3+2)
print("what is 5-7?",5-7)
print("oh,that's why it's false.")
print("hello about some more.")
print("Is it greater?",5>-2)
print("Is it greater or equal?",5<=-2)
print("Is it less or equal?",5<=-2)

习题4

There are 100 cars available.
There are only 30 drivers available.
There will be 70 empty cars today.
We can transport 120.0 poeple today.
We have 90 to carpool today.
We need to put about 3.0 in each car.

习题5

Let's talk about Zed A. Shaw.
Let’s 74 inches tall.
He's 180 pounnds heavy.
Actually that's not too heavy.
He's got Blue eyes and brown hair.
His teeth are usually white depending on the coffee.
If I add35,74,and180 I get 289.

习题6

x="There are%d types of people."%10
binary="binary"
do_not="don't’"
y="Those who know %s and those who %s"%(binart,do_not)
未完待续

你可能感兴趣的:(【Python爬虫】-《笨办法学 Python》练习)