Python 3.4 question

Yeah, it's on my computer at home. I'll have to post it when I get there.

but its basically

import mod1 #consists of afun1(), afun2(), afun3() import mod2 #consists of bfun1(), bfun2(), bfun3() import mod3 #consists of cfun1(), cfun2(), cfun3()

def opt1(): opt1 = int(input("Please choose which function you would like to run 1,2 or 3.")) def opt2(): opt2 = int(input("Please choose which function you would like to run 1,2 or 3.")) def opt3(): opt3 = int(input("Please choose which function you would like to run 1,2 or 3."))

if opt1() == 1: afun1() if opt1() == 2: afun2() if opt1() == 3: afun3() if opt2() == 1: bfun1() if opt2() == 2: bfun2() if opt2() == 3: bfun3() if opt3() == 1: cfun1() if opt3() == 2: cfun2() if opt3 == 3: cfun3() else: print("Not a valid option")

What I want to do is have the user be prompted to make all three choices and then run the three functions that were chosen in order of their choice.

I also don't want it to bomb out if the user enters something other than the options provided.

/r/learnpython Thread Parent