Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Requirement #1")
- print("This program practices working with lists, strings, tuples, and dictionaries.")
- weeks = ("Week One", "Week Two")
- days = ("Thursday", "Friday", "Saturday")
- empInfo = {}
- thursday = []
- friday = []
- saturday = []
- thursday2 = []
- friday2 = []
- saturday2 = []
- commentsList = []
- commentTotal = []
- userInput = input("Do you have name and dealership to enter? (y/n)")
- #populates dictionary with names and dealerships
- while (userInput == "y"):
- empName = input("Enter the employee's first and last name:")
- empDealership = input("Enter the dealership they work at:")
- empInfo[empName] = empDealership
- userInput = input("Do you have more names to enter? (y/n)")
- #appends lists for w1 and w2 with sales data entered by user
- i = 0
- for key in empInfo.keys():
- print("Week One Sales")
- thursday.append(int(input("Thursday sales by " + key)))
- friday.append (int(input("Friday sales by " + key)))
- saturday.append (int(input("Saturday sales by " + key)))
- print("Week Two Sales")
- thursday2.append(int(input("Thursday sales by " + key)))
- friday2.append(int(input("Friday sales by " + key)))
- saturday2.append(int(input("Saturday sales by " + key)))
- i += 1
- #comment code below
- comments = input("Do you want to enter salesperson comments? (y/n) ")
- while(comments == "y"):
- commentsList.append(input("Enter comment:"))
- comments = input("More comments to enter? (y/n)")
- if empInfo[empName] in commentsList:
- #need to add 1 to their specific comments then output it below!!!
- #prints out sales data
- j = 0
- for name, dealer in empInfo.items():
- print("\n")
- print(name + " of " + dealer)
- print("Week One")
- print("Thursday:" + str(thursday[j]))
- print("Friday:"+ str(friday[j]))
- print("Saturday" + str(saturday[j]))
- print("\n")
- print("Week Two")
- print("Thursday:" + str(thursday2[j]))
- print("Friday:" + str(friday2[j]))
- print("Saturday" + str(saturday2[j]))
- print("\n")
- print("Total Cars Sold: " + str(thursday[j] + friday[j] + saturday[j] +
- thursday2[j] + friday2[j] + saturday2[j]))
- total = thursday[j] + friday[j] + saturday[j] + thursday2[j] + friday2[j] + saturday2[j]
- print("Average Cars Sold " + str(total/6))
- print("Number of Compliments:")
- j += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement