cs final pre release

mail@pastecode.io avatar
unknown
plain_text
3 years ago
9.9 kB
3
Indexable
Never
Number_of_Members= int(input("How many memebers do you want to add: "))
First_Name=[""]*Number_of_Members
Last_Name=[""]*Number_of_Members
Volunteer=[""]*Number_of_Members
Area=[""]*Number_of_Members
date_of_joining=[""]*Number_of_Members
Paid=[""]*Number_of_Members
members_who_volunteer=[""]*Number_of_Members
pierentrance=[""]*Number_of_Members
giftshop=[""]*Number_of_Members
painting_and_decorating=[""]*Number_of_Members
expired_membership=[""]*Number_of_Members
not_paid=[""]*Number_of_Members
sponsorship_text= [""]*Number_of_Members
sponsorship= [""]*Number_of_Members
data_to_print= [""]*Number_of_Members
charge=[""]*Number_of_Members

#Task 1
for i in range (Number_of_Members):
    First_Name[i]= input("Enter your first name: ")
    while First_Name[i]=="" :
        print("Please ensure you enter your first name")
        First_Name[i]= input("Enter your first name: ")
    Last_Name[i]= input("Enter your last name: ")
    while Last_Name[i]=="":
        print("Please ensure you enter your last name")
        Last_Name[i]= input("Enter your last name: ")
    options= input("Do you want to become a volunteer (Yes/No): ").lower()
    while options !=("yes") and options !=("no"):
        print("Please ensure you say Yes or No")
        options= input("Do you want to become a volunteer (Yes/No): ").lower()
    if options=="yes":
        Volunteer[i]= "wants to become a volunteer at"
    if options=="no":
        Volunteer[i]= "Does not want to become a volunteer"
    if options=="no":
            Area[i]=""
    if options=="yes":
        print("1 = the pier entrance gate")
        print("2 = the gift shop")
        print("3 = painting and decorating")
        location=input("Please enter the number corresponding to the area you want to work at: ")
        while location !=("1") and location !=("2") and location !=("3"):
             print("Please ensure you choose the correct number that represents where you want to work at")
             location=input("Please enter the number corresponding to the area you want to work at: ")
        if location=="1":
            Area[i]= "The pier entrance gate"
        if location=="2":
            Area[i]= "The gift shop"
        if location=="3":
            Area[i]= "Painting and decorating"
    day= int(input("Enter the day of joining (1 to 31): "))
    while day<1 or day>31 :
        print("Please ensure you enter the day you joined (1 to 31): ")
        day= int(input("Enter the day of joining (1 to 31): "))
    month= int(input("Enter the month of joining (1 to 12): "))
    while month<1 or month>12:
        print("Please ensure you enter the month of joining (1 to 12): ")
        month= int(input("Enter the month of joining (1 to 12): "))
    year= int(input("Enter the year of joining (2000 till 2022): "))
    while year>2022 or year<2000:
        print("Please enter the year of joining (2000 till 2022): ")
        year= int(input("Enter the year of joining (2000 till 2022): "))
    date_of_joining[i]=f"{day}/{month}/{year}"
        
    fee= input("Have you paid the $75 Fee? Yes/No: ").lower()
    while fee !=("yes") and fee !=("no"):
        print("Please say Yes or No")
        fee= input("Have you paid the $75 Fee? Yes/No: ").lower()
    if fee=="yes":
        Paid[i]="and has paid the $75 fee"
    else:
        Paid[i]="and has not paid the $75 fee"
    #Task 2
    if options=="yes":
        members_who_volunteer[i]= f"{First_Name[i]} {Last_Name[i]} wants to become a volunteer"
    if location=="1":
        pierentrance[i]= f"{First_Name[i]} {Last_Name[i]} wants to become a volunteer at {Area[i]}"
    if location=="2":
        giftshop[i]= f"{First_Name[i]} {Last_Name[i]} wants to become a volunteer at {Area[i]}"
    if location=="3":
        painting_and_decorating[i]= f"{First_Name[i]} {Last_Name[i]} wants to become a volunteer at {Area[i]}"
    if year<2022:
        expired_membership[i]= f"{First_Name[i]} {Last_Name[i]} has an expired membership" 
    if fee=="no":
        not_paid[i]= f"{First_Name[i]} {Last_Name[i]} has not paid the $75 fee"
    print("1 = Members who have chosen to volunteer \n" \
              "2=Volunteers who would like to work at the pier entrance gate \n" \
              "3=Volunteers who would like to work at the gift shop \n" \
              "4=Volunteers who would like to help with the painting and decorating tasks\n" \
              "5=Members whose membership has expired\n" \
              "6=Members who have not paid their $75 fee ")
    data_to_print[i]= input(" Choose the number above corresponding to what you want to print or say 'None' if you dont want to print anything: ")
    while data_to_print[i] !=("1") and data_to_print[i] !=("2") and data_to_print[i] !=("3") and data_to_print[i] !=("4") and data_to_print[i] !=("5") and data_to_print[i] !=("6")and data_to_print[i] !=("None"):
        data_to_print[i]= input(" Choose the number above corresponding to what you want to print or say 'None' if you dont want to print anything: ")
    if data_to_print[i]== "1":
        data_to_print[i]= members_who_volunteer[i]
    if data_to_print[i]== "2":
        data_to_print[i]= pierentrance[i]
    if data_to_print[i]== "3":
        data_to_print[i]= giftshop[i]
    if data_to_print[i]== "4":
        data_to_print[i]= painting_and_decorating[i]
    if data_to_print[i]== "5":
        data_to_print[i]= expired_membership[i]
    if data_to_print[i]== "6":
        data_to_print[i]= not_paid[i]
    if data_to_print[i]== "None":
        data_to_print[i]= ""
    print(data_to_print[i])
    
    

    #Task3

for i in range (Number_of_Members):
    sponsor = input("Do you want to sponsor a wooden plank (Yes/No): ").lower()
    while sponsor !=("yes") and sponsor !=("no"):
        print("Please say Yes or No")
        sponsor = input("Do you want to sponsor a wooden plank (Yes/No): ").lower()
    if sponsor=="yes":
        sponsorship_text[i]= input("Enter the message you want on the brass plaque (not larger than 20 words): ")
    if len(sponsorship_text[i].split())>20:
            print("Please enter a message that is no longer than 20 words")
            sponsorship_text[i]= input("Enter the message you want on the brass plaque (not larger than 20 words): ")
    sponsorship[i]= f"{First_Name[i]} {Last_Name[i]} wants to sponsor a wooden plank with text '{sponsorship_text[i]}'"
    print("Sponsor status is:",sponsor )
    print("Sponsorship text is:",sponsorship_text[i])
    print("You will be charged $200 for the sponsorship")
    errors= input(" Are there any errors you would like to correct (Yes/No): ").lower()
    while errors !=("yes") and errors !=("no"):
        errors= input(" Are there any errors you would like to correct (Yes/No): ").lower()
    while errors == "yes":
        if sponsor=="yes":
            sponsorship_text[i]= input("Enter the message you want on the brass plaque (not larger than 20 words): ")
        if len(sponsorship_text[i].split())>20:
                print("Please enter a message that is no longer than 20 words")
                sponsorship_text[i]= input("Enter the message you want on the brass plaque (not larger than 20 words): ")
        sponsorship[i]= f"{First_Name[i]} {Last_Name[i]} wants to sponsor a wooden plank with text '{sponsorship_text[i]}'"
        print("Sponsor status is:",sponsor )
        print("Sponsorship text is:",sponsorship_text[i])
        print("You will be charged $200 for the sponsorship")
        errors= input(" Are there any errors you would like to correct (Yes/No): ").lower()
        while errors !=("yes") and errors !=("no"):
            errors= input(" Are there any errors you would like to correct (Yes/No): ").lower()
    if fee=="no" and sponsor=="yes":
        charge[i]= f"$275"
    if fee=="yes" and sponsor=="no":
        charge[i]= f"$0"
    if fee=="yes" and sponsor=="yes":
        charge[i]= f"$200"
    if fee=="no" and sponsor=="no":
        charge[i]= f"$75"

print("1 = Members who have chosen to volunteer \n" \
          "2=Volunteers who would like to work at the pier entrance gate \n" \
          "3=Volunteers who would like to work at the gift shop \n" \
          "4=Volunteers who would like to help with the painting and decorating tasks\n" \
          "5=Members whose membership has expired\n" \
          "6=Members who have not paid their $75 fee ")
#data_to_print[i]= input(" Choose the number above corresponding to what you want to print or say 'None' if you dont want to print anything: ")
#while data_to_print[i] !=("1") and data_to_print[i] !=("2") and data_to_print[i] !=("3") and data_to_print[i] !=("4") and data_to_print[i] !=("5") and data_to_print[i] !=("6")and data_to_print[i] !=("None"):
#    data_to_print[i]= input(" Choose the number above corresponding to what you want to print or say 'None' if you dont want to print anything: ")
#if data_to_print[i]== "1":
#    data_to_print[i]= members_who_volunteer[i]
#if data_to_print[i]== "2":
#    data_to_print[i]= pierentrance[i]
#if data_to_print[i]== "3":
#    data_to_print[i]= giftshop[i]
#if data_to_print[i]== "4":
#    data_to_print[i]= painting_and_decorating[i]
#if data_to_print[i]== "5":
#    data_to_print[i]= expired_membership[i]
#if data_to_print[i]== "6":
#    data_to_print[i]= not_paid[i]
#if data_to_print[i]== "None":
#    data_to_print[i]= ""
        
        
            
            
        
    
        
        
for i in range (Number_of_Members):
    print(f"{First_Name[i]} {Last_Name[i]} {Volunteer[i]} {Area[i]} and the start of the membership is {date_of_joining[i]} and the charge is {charge[i]}")
    print(data_to_print[i])