I'm trying to create a separate function which takes an integer input. I want to then insert that function I created into the main function by only calling it by the name I gave it. I must be misunderstanding something about the def() and how to call the defined function? I added a simplified example of what I'm trying to do below
#This would be the function I make to use later in main program
def functionforlater(value):
if(value == 2):
print("oranges")
else:
print("try again")
#This would be the main program
for(int x=0;x>3;x++):
functionforlater(x)
# I've now come to the conclusion that the main program is the fault since there is no
# such thing as for(int x=0;x>3;x++) in python they use "for x in range()" or xrange
#Solution for main program would be
for x in xrange(4):
functionforlater(x)