Lottery Ticket Challange- Python Coding
I have coded...
import random#listspick=[]rand_ticket=[]#variables#writeoutFile = open("lotteryTicket.txt","w")count=0ticket=""while count <>ticket=(int(input("Enter a 1 digit number:")))ticketList=pick.append(ticket)count=count+1outFile.write(str(ticket)+"\n")outFile.close()#print out the numbers they pickedprint("Your ticket number is %s"%(pick))#read the fileinFile = open("lotteryTicket.txt","r")line = inFile.readline()while (line):line = inFile.readline()count2=0while count2<>rand_ticket.append(random.randint(1, 9))count2+=1print("The winning ticket is %s"%(rand_ticket))#compare numbers
complete this code to...
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here