《Python编程:从入门到实践》答案(7-8章)

事实上,除了你自己没人有必要考虑你的感受。你喜欢什么事,什么人,有什么想法,去做就好,不用问,答案在你心中。

message=input("what kind of the car do you want ?")
print('Let me see if I can find you a'+ message)

print('how many people do you have?')	
ans=input()
ans=int(ans)
if ans>=8:
	print('Sorry ,there are nothing for you')
else:
	print('welcome,there are enough sets for you')

message=input("Please input your number: ")
message=int(message)
if message%10==0:
	print("Your number is multiple of 10.")
else :
	print("Your number can not be divisible by 10.")


message=""
while message!='quit':
	message=input("Please input your toppings : ")
	if message!='quit':
		print("Ok,we will add "+message+" in your pizza.")
	else:
		break

 

message=""
while True:
	message=input("Enter your age please: ")
	message=int(message)
	if message<=3:
		print("price=0")
	elif message<12:
		print("price=$10")
	else:
		print("price=$15")

#使用条件测试来结束循环
message=""
while message!=0:
	message=input("Enter your age please: ")
	message=int(message)
	if message!=0:
		if m
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

纸城

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值