Advertisement
mrScarlett

Array example help with task 2

Jan 22nd, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. employees=[]
  2. totalSales=0
  3. noOfEmployees=5
  4.  
  5. for x in range(noOfEmployees):
  6.     name=input("Enter name")
  7.     employees.append(name)
  8.     sales=int(input("Enter amount of sales"))
  9.     totalSales+=sales
  10.  
  11.  
  12. for x in range(len(employees)):
  13.     print("Employee",x+1,"is",employees[x])
  14.  
  15. print(totalSales)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement