Python Forum
Python Forum
>
Python Coding
>
General Coding Help
> Can't get defined random integer to print properly?
Full Version:
Can't get defined random integer to print properly?
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
thb202
Aug-29-2018, 08:55 AM
https://imgur.com/a/TAarvQQ
^I've attached the image above, program when it runs is on the left. Any help would be appreciated
vndywarhol
Aug-29-2018, 10:15 AM
import random print("Welcome!") def diceroll(): return random.randint(1, 6) print(diceroll())
Now this works. You did not return anything.
Python Forum
>
Python Coding
>
General Coding Help
> Can't get defined random integer to print properly?