Advertisement
Guest User

Untitled

a guest
Jul 9th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1.  
  2.  
  3. print("Requirement #1")
  4. print("This program practices working with lists, strings, tuples, and dictionaries.")
  5.  
  6. weeks = ("Week One", "Week Two")
  7. days = ("Thursday", "Friday", "Saturday")
  8. empInfo = {}
  9.  
  10. thursday = []
  11. friday = []
  12. saturday = []
  13.  
  14. thursday2 = []
  15. friday2 = []
  16. saturday2 = []
  17.  
  18. commentsList = []
  19. commentTotal = []
  20.  
  21.  
  22. userInput = input("Do you have name and dealership to enter? (y/n)")
  23.  
  24.  
  25. #populates dictionary with names and dealerships
  26. while (userInput == "y"):
  27. empName = input("Enter the employee's first and last name:")
  28. empDealership = input("Enter the dealership they work at:")
  29. empInfo[empName] = empDealership
  30. userInput = input("Do you have more names to enter? (y/n)")
  31.  
  32.  
  33. #appends lists for w1 and w2 with sales data entered by user
  34. i = 0
  35. for key in empInfo.keys():
  36. print("Week One Sales")
  37. thursday.append(int(input("Thursday sales by " + key)))
  38. friday.append (int(input("Friday sales by " + key)))
  39. saturday.append (int(input("Saturday sales by " + key)))
  40. print("Week Two Sales")
  41. thursday2.append(int(input("Thursday sales by " + key)))
  42. friday2.append(int(input("Friday sales by " + key)))
  43. saturday2.append(int(input("Saturday sales by " + key)))
  44. i += 1
  45.  
  46. #comment code below
  47.  
  48. comments = input("Do you want to enter salesperson comments? (y/n) ")
  49.  
  50. while(comments == "y"):
  51.  
  52. commentsList.append(input("Enter comment:"))
  53. comments = input("More comments to enter? (y/n)")
  54.  
  55.  
  56. if empInfo[empName] in commentsList:
  57. #need to add 1 to their specific comments then output it below!!!
  58.  
  59.  
  60.  
  61.  
  62. #prints out sales data
  63. j = 0
  64. for name, dealer in empInfo.items():
  65. print("\n")
  66. print(name + " of " + dealer)
  67. print("Week One")
  68. print("Thursday:" + str(thursday[j]))
  69. print("Friday:"+ str(friday[j]))
  70. print("Saturday" + str(saturday[j]))
  71. print("\n")
  72. print("Week Two")
  73. print("Thursday:" + str(thursday2[j]))
  74. print("Friday:" + str(friday2[j]))
  75. print("Saturday" + str(saturday2[j]))
  76. print("\n")
  77.  
  78. print("Total Cars Sold: " + str(thursday[j] + friday[j] + saturday[j] +
  79. thursday2[j] + friday2[j] + saturday2[j]))
  80.  
  81. total = thursday[j] + friday[j] + saturday[j] + thursday2[j] + friday2[j] + saturday2[j]
  82.  
  83. print("Average Cars Sold " + str(total/6))
  84.  
  85. print("Number of Compliments:")
  86.  
  87. j += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement