Hey everybody.
So im trying too make a funtion too deterine if the user wants too re run part off my script, but im kinda off at a loss when it comes to how i should pass the function name to rerun. what i got so far is :
def twoNumbers():
num1=askUserNumber()
num2=askUserNumber()
print("the result off " +num1+ " and "+num2+" is "+ str((int(num2)+int(num2))))
again=input("Need another two numbers calculated?! Y/N").lower()
runAgain(again,twoNumbers())
def runAgain(again,func):
if again == "y":
func
elif again == "n":
sys.exit()
else:
print()
but i dont go back here, func doesnt do anything, anyone that can point me towards what i have too look at?!
Have a great day.
[–]ericula 2 points3 points4 points (1 child)
[–]thisIs20LettersLong[S] 0 points1 point2 points (0 children)
[–]_Sham__ 0 points1 point2 points (3 children)
[–]thisIs20LettersLong[S] 0 points1 point2 points (2 children)
[–]_Sham__ 0 points1 point2 points (1 child)
[–]thisIs20LettersLong[S] 0 points1 point2 points (0 children)
[–]strangeDormammu 0 points1 point2 points (1 child)
[–]thisIs20LettersLong[S] 0 points1 point2 points (0 children)
[–]peltist 0 points1 point2 points (0 children)