samedi 19 décembre 2020

Beginner Python random input

Hi i'm trying to make a program that show random numbers from 1 to a user input number but it doesn't work.

This is the code:

def random_number():
    max = input("Insert max number -> ")
    ris = random.randint(1, max)
    print(ris)

Can someone help me?




Aucun commentaire:

Enregistrer un commentaire