jeudi 30 avril 2020

Python3 beginner - coding problems [closed]

i am doing school course python basics, and yes, running into problems in the codes. I can't seem to figure out, how to find my way in the code and get it running smoothly. So here's my questions: 1.) The task is to create a lottery machine, which generates rows of random numbers between 1 - 40 (7 lottery numbers/row). I am not allowed to use random.sample, lottery code should ask from the user: how many rows do you want to play...and code should print out the amount rows with randomly generated lottery numbers (each row can only contain unique numbers, as in 1,5,16,39....not like 1,5,16,5,39,1,39....). I have managed to create some sort of code for this, actually many variations from it. Some codes generate unique numbers 5 rows, until list containing 1-40 numbers run out. Other codes copy the same randomly generated row...

So, what kind of code do I need to write to this?




Aucun commentaire:

Enregistrer un commentaire