mardi 18 août 2020

Generate random line based on number

I am new with Python and I would like to generate a line based on a random number.

First I want to get a vector with random numbers between 0 and 9. And then I would like to get a line based on each number. The number can mean the length of the line. So if I got a number 7, then a line of 7 cm appears. If I get a 0 then there is no line. Also, I want to add color to each line.

Also, I would like that the lines appear in different screens, not all in the same one.

Can you help me with this?

Thank you!




Aucun commentaire:

Enregistrer un commentaire