mercredi 25 octobre 2017

How Do I Compare Random Generated Values Python

Basically i am using a random generator in python to generate a random number 3 times like this

for x in range(1,4):
    Card = random.randint(2, 14)
    print(Card)

However, now i want to compare the 3 random numbers that were generated to output a message stating the highest number that was generated

i.e if 4, 6 and 10 were randomly generated the message i want outputted would be "Your highest number is 10".

How would i attempt to do that i am stuck can someone please help?




Aucun commentaire:

Enregistrer un commentaire