Dec-17-2016, 06:41 PM
So I know how to pull up an image using python, however I was hoping to make a program that would call a predetermined image based on a random number...
I.e. I say x=random.randrange(5)
if x=1 it calls a pic of a big #1, 2 calls #2 and so on and so forth.
So what I have right now is a program that calls a picture of #1, and it works (lets say this fully functional program is called funOne(jpg))
here's what I'm trying to do
x=random.randrange(5)
if x =1:
#commandThatImLookingForHere funOne(jpg)
if x =2:
#commandThatImLookingForHere funTwo(jpgTwo)
etc etc.
I'm sorry if that was hard to understand, I've been up for a good number of hours. And I thank you for any help you guys can provide.
I.e. I say x=random.randrange(5)
if x=1 it calls a pic of a big #1, 2 calls #2 and so on and so forth.
So what I have right now is a program that calls a picture of #1, and it works (lets say this fully functional program is called funOne(jpg))
here's what I'm trying to do
x=random.randrange(5)
if x =1:
#commandThatImLookingForHere funOne(jpg)
if x =2:
#commandThatImLookingForHere funTwo(jpgTwo)
etc etc.
I'm sorry if that was hard to understand, I've been up for a good number of hours. And I thank you for any help you guys can provide.