Guest User

Untitled

a guest
Mar 10th, 2016
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. numDealers = int(input('Enter the number of dealers.'))
  2. index=0
  3. array = index
  4. name = [0]*array
  5. sales = [0]*array
  6. comm = [0]*array
  7. x = 1
  8.  
  9. while x <= numDealers:
  10. for index in range(0,array):
  11. name[index] = int(input('Enter the dealer name.'))
  12. sales[index] = int(input('Enter the dealer sales.'))
  13. for index in range(0,array):
  14. if sales[index] < 0:
  15. print('Amount cannot be negative. Try again.')
  16. x=x+1
  17.  
  18. array=index
  19. for index in range(0,array):
  20. if sales[index] >= 1 and sales[index] <= 5000:
  21. comm[index] = (sales[index]* 0.05)
  22. if sales[index] >= 5000 and sales[index] <= 15000:
  23. comm[index] = (sales[index]* 0.10)
  24. if sales[index] >= 15000:
  25. comm[index] = (sales[index]* 0.12)
  26.  
  27.  
  28. print(sales[index])
  29. print(comm[index])
  30. print(name[index])
  31.  
  32. search = print(input('What is a dealer name?'))
  33. if search != (name[index]):
  34. print('Error')
  35. else print(sales[index]) and print(comm[index])
Advertisement
Add Comment
Please, Sign In to add comment