Python syntax error


#1

BRINGNG IT ALL TOGETHER

It says assign the variable "MONTY" the value true..it shows NONE

What is wrong with the code ...pls help with the correct method and code

#mustafa
def monty():
    monty=True
def python():
    python=1.234
def monty_python():
    monty_python=python*python

#2

why do you use functions?

functions don't execute unless called, you never call the function, so it doesn't execute so the variable doesn't get created

even if you call the functions, the variable will have a local scope, so that might still be problematic, i would advise to remove the functions


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.