日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > python >内容正文

python

Python编程:从入门到实践第二版答案(第七章)

發(fā)布時(shí)間:2023/12/18 python 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Python编程:从入门到实践第二版答案(第七章) 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

?7-1

car = input("which car do you want to lease? ") print(f"Let me see if i can find you a {car}")

7-2

people = input("How many of you are there? ") people = int(people) if people <= 8:print("Welcome!") else:print("sorry,We don't have any tables available.")

7-3

num = input("please input a number.And i will tell you if it is a multiple of 10: ") num = int(num) if num%10 == 0:print("it is a multiple of 10.") else:print("sorry,it is not a multiple of 10.")

7-4

word = "" while word != "quit":word = input("Enter the pizza ingredients you want: ")if word != "quit":print(f"{word} will be added.")

?7-5

while True:age = input("Your age: ")if age == "quit":breakage = int(age)if age < 3:print("You are free.ヽ(?゚▽゚)ノ")elif age < 13:print("Your ticket is 13.")else:print("Your ticket is 15")

7-6

#使用active,另外兩項(xiàng)7-4 7-5均有使用 active = True while active:word = input("Enter the pizza ingredients you want: ")if word != "quit":print(f"{word} will be added.")else:active = False

7-7

active = True while active:print('1')

?7-8

Sandwich_orders = ['tuna', 'button', 'chicken'] finished_sandwich = [] while Sandwich_orders:sandwich = Sandwich_orders.pop()print(f"I made your {sandwich} sandwich.")finished_sandwich.append(sandwich) print(finished_sandwich)

7-9

Sandwich_orders = ['pastrami', 'tuna', 'button', 'pastrami', 'chicken', 'pastrami'] print("The pastrami was sold olt.") while 'pastrami' in Sandwich_orders:Sandwich_orders.remove('pastrami') print(Sandwich_orders)

7-10

active = True favorite_place = {} while active:name = input("what's your name? ")place = input("If you could visit one place in the world,where would you go: ")favorite_place[name] = placeans = input("Is there anyone next?(yes/no)")if ans == "no":break for name, place in favorite_place.items():print(f"{name} favorite place is {place}")

總結(jié)

以上是生活随笔為你收集整理的Python编程:从入门到实践第二版答案(第七章)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。