# Task 1: Print out each speed in the list

## The police chief needs a report of the speeds. Write a program that prints out each speed in the speeds list.

speeds = [45, 55, 35, 52, 43, 47, 59, 93, 22, 76]

for speed in speeds:
print(speed)

# Task 2: Give out Tickets

## Now you need to give out tickets to those who are going over the speed limit of 45mph. Write a program that prints out 'You got a ticket' if the speed is over 45mph.

speeds = [45, 55, 35, 52, 43, 47, 59, 93, 22, 76]

for speed in speeds:
if speed > 45:
print('You got a ticket')

## If the driver is going the correct speed, print 'Great Job!'

speeds = [45, 55, 35, 52, 43, 47, 59, 93, 22, 76]

for speed in speeds:
if speed < 45:
print('Go Faster')
elif speed > 45:
print('Slow Down')
else:
print('Great Job!')

## Once you are caught speeding the cop has a 60% chance of catching you. Write a program that prints “You got caught”, “You outran the cops”, or “The cops left you alone” depending the the situation.

from random import randint

speeds = [45, 55, 35, 52, 43, 47, 59, 93, 22, 76]

for speed in speeds:
if speed <= 45:
print('Speed:', speed, 'The cops left you alone')
else:
catch = randint(1,100)
if catch < 60:
print('Speed:', speed,'You got caught')
else:
print('Speed:', speed,'You got away')