In: Computer Science
***This program is to be created using Python***
Requirements to be numbered in program01.py:
• First Name
• Last Name
• Membership Level
i. Composer
ii. Conductor
iii. Musician
• Seat Preference
i. Orchestra
ii. Main
iii. Balcony
• Meal Type
i. Chicken
ii. Fish
iii. Vegan
• if Composer and Orchestra:
i. “You qualify for these are exceptional seats!”
• if Composer and Main:
i. “The seats in the main section are good seats.”
• if Composer and Balcony:
i. “Interesting, let us know if you want closer seats.”
• if Conductor and Orchestra:
i. “Member level of Composer required if you want to sit in the orchestra section.”
• if Conductor and Main:
i. “The seats in the main section are good seats.”
• if Conductor and Balcony:
i. “Interesting, let us know if you want closer seats.”
• if Musician and Orchestra:
i. “Member level of Composer required if you want to sit in the orchestra section.”
• if Musician and Main:
i. “Member level of Composer or Conductor required if you want to sit in the main section.”
• if Musician and Balcony:
• The concert was wonderful.
• The food was fantastic.
• The seats were superb.
• if Composer and (total score less than 12 or any score less than 4):
i. “Dear Composer, Your survey score of <score> was lower than we would like. Please give us another opportunity soon.”
• Else // Composer
i. “Thank you for being a Composer member and for having a good time!”
• if Conductor and (total score less than 11 or any score less than 3):
i. “Dear Conductor, Your survey score of <score> was lower than we would like. The next time you attend we will be nicer.
• Else //Conductor
i. “Thank you for being a Conductor member and for having a good time!”
• if Musician and (total score less than 10 or any score less than 2):
i. “Dear Musician, Your survey score of <score> was lower than we would like. You will have more fun next time.”
• Else // Musician
Code:
import sys
print("This program provides concert seat assignments")
fn=input("Enter your first name\n")
ln=input("Enter your last name\n")
ml=int(input("Select the membership level\n1)Composer\n2)Conductor\n3)Musician\n*Options 1 or 2 or 3\n"))
sp=int(input("Select your seat preference\n1)Orchestra\n2)Main\n3)Balcony\n*Options 1 or 2 or 3\n"))
mt=int(input("Select the preffered meal type\n1)Chicken\n2)Fish\n3)Vegan\n*Options 1 or 2 or 3\n"))
if(ml==1 and sp==1):
print("Mr./Mrs.",fn,ln,", you qualify for these exceptional seats!\n")
elif(ml==1 and sp==2):
print("Mr./Mrs.",fn,ln,", the seats in the main section are good seats.\n")
elif(ml==1 and sp==3):
print("Mr./Mrs.",fn,ln,", interesting, let us know if tou want closer seats.\n")
elif(ml==2 and sp==1):
print("Mr./Mrs.",fn,ln,", member level of Composer required if you want to sit in the orchestra section.\n")
elif(ml==2 and sp==2):
print("Mr./Mrs.",fn,ln,", the seats in the main section are good seats.\n")
elif(ml==2 and sp==3):
print("Mr./Mrs.",fn,ln,", interesting, let us know if you want closer seats.\n")
elif(ml==3 and sp==1):
print("Mr./Mrs.",fn,ln,", member level of Composer required if you want to sit in the orchestra section.\n")
elif(ml==3 and sp==2):
print("Mr./Mrs.",fn,ln,", member level of Composer or Conductor required if you want to sit in the main section.\n")
elif(ml==3 and sp==3):
print("Mr./Mrs.",fn,ln,", your balcony seats are confirmed.\n")
else:
print("We do not recognize the musical genre.\n")
sys.exit()
print("Please rate our services\n*From 1-5 (1 being the lowest and 5 being the highest).\n")
c=int(input("How well did you like the concert.\n"))
f=int(input("How well did you like the food.\n"))
s=int(input("How well did you like the seats.\n"))
if ( ml==1 and ( (c+f+s <12 ) or (c<4 or f<4 or s<4))):
print("Dear Composer, Your survey score of ",c+f+s," was lower than we would like. Please give us another opportunity soon.\n")
elif(ml==1):
print("Thank you for being a Composer member and for having a good time!\n")
if ( ml==2 and ( (c+f+s <11 ) or (c<3 or f<3 or s<3))):
print("Dear Conductor, Your survey score of ",c+f+s," was lower than we would like. Please give us another opportunity soon.\n")
elif(ml==2):
print("Thank you for being a Conductor member and for having a good time!\n")
if ( ml==3 and ( (c+f+s <10 ) or (c<2 or f<2 or s<2))):
print("Dear Musician, Your survey score of ",c+f+s," was lower than we would like. Please give us another opportunity soon.\n")
elif(ml==3):
print("Thank you for being a Musician member and for having a good time!\n")
Output: