I'd like to implement a function where a value is incrementally increased with randint() between x and x * 1.1 BUT I'd like to cap the range when it's been used enough times.
Is it possible to combine something like 'and' with the properties of randint(). I've fooled around for a while but haven't come up with something that works. Maybe I'm missing something obvious re: syntax.
e.g new_val = randint(old_val, (old_val * 1.1) and !> max_val)
Aucun commentaire:
Enregistrer un commentaire