循环问题Python

时间:2017-11-07 16:08:06

标签: python loops

我需要询问用户有多少人在预订,最多8人然后拿这个数量并要求用户1详细信息,用户2详细信息等。稍后将打印的详细信息。不知道我该怎么做新的python。

manager_name = raw_input("please enter managers Name: ")
email_address = raw_input("please enter your Email Address: ")
phone_number = raw_input("please enter your Phone number: ")



print("-----------------------------------------------------")
print ("Our Stuido can Accommodate up to max 8 musicians")
print("-----------------------------------------------------")

amount_of_band_members = int(raw_input("please enter the amount of band members"))

values = []
for i in range(amount_of_band_members):
values.append(int(input('Please enter Muscians Names & Insterments: ')))

1 个答案:

答案 0 :(得分:0)

manager_name = raw_input("please enter managers Name: ")
email_address = raw_input("please enter your Email Address: ")
phone_number = raw_input("please enter your Phone number: ")


print("-----------------------------------------------------")
print ("Our Stuido can Accommodate up to max 8 musicians")
print("-----------------------------------------------------")

amount_of_band_members = int(raw_input("please enter the amount of band members"))

if amount_of_band_members >8:
    print ("Sorry we can only Accommodate maxuim 8 Musicians")
else :
    print raw_input("please enter musicians and insterments")


while amount_of_band_members <8:
    print raw_input("please enter next name")
    amount_of_band_members +=1