Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #List of cars entering the parking every hour
- #count :To calculate total hours
- #sum : total cars
- #The Parkinage holds 200 cars.
- print ("\t \t hey Client \n Enter the number of cars per hour. into the parking")
- list=[]
- count=0
- sum=0
- day=1
- hourse=1
- print ("day",day)
- while True:
- try:
- print("HOURSE", hourse)
- x=int(input())
- except :
- print("value error","pleas try again")
- continue
- if x >200 :
- print("The parking can't hold.")
- x= 200
- if x <0 :
- break
- list.append(x)
- count += 1
- sum += x
- hourse +=1
- if hourse == 25:
- hourse -=24
- day += 1
- print("the all list for day" , list)
- print("##### \n day",day)
- print ("all list " , list)
- print("the maximum numper =",max(list))
- print(" the minemum numper =",min(list))
- print(" sum of all cars = ",sum)
- avarge =sum/count
- print("avarge is = ",avarge )
- print("count is =",count)
- print("the all list ",(list))
- f = float(input("Enter a number to see what hour the event was"))
- print (list.index(f)+1)
Advertisement
Add Comment
Please, Sign In to add comment