#Code which prints out profit and winnings along with how long it took for them to win
import random
counter = 0

numOfTickets = int(input("How many weeks do you want to play?"))
num1 = int(input("Please enter in your first number (1-10)"))
num2 = int(input("Please enter your seccond number (11-20)"))
num3 = int(input("Please enter in your final number(21-30)"))
ticketCost = 8
i = 0
winnings = 0
profit = 0
for i in range(numOfTickets):
    winningNum1 = random.randint(1,10)
    winningNum2 = random.randint(11,20)
    winningNum3 = random.randint(21,30)
    
    i += 1
    
    print("Week: ", i)

    if num1 == winningNum1:
        counter += 1

    if num2 == winningNum2:
        counter += 1

    if num3 == winningNum3:
        counter += 1

    print("The winning numbers were: ", winningNum1, winningNum2, winningNum3)
    if counter == 0:
        print("You won nothing")

    if counter == 1:
        print("You won £10")
        winnings += 10

    if counter == 2:
        print("You won £500")
        winnings += 500

    if counter == 3:
        print("Congratz you won £24,000")
        winnings += 24000

    counter = 0

print("You played for ", i, "weeks:")
print("You spent £", i * ticketCost, "Trying to win, ouch..")
profit = winnings - (i * ticketCost)
print("You ended up profiting £", profit)
        

    

