mercredi 16 novembre 2016

How to make random numbers with variables in python?

I encountered a problem while programming in Python, and here's a bite of my program:

import random 

p = raw_input('Percent Probability Program\nWhat percent?\n ')

r1 = random.randint(p, 100)

It gave me an error that the first value in the random command wasn't an integer. Please help!




Aucun commentaire:

Enregistrer un commentaire