mercredi 22 avril 2015

Python: why does it not use the created variable?

Why is this not working?


x = 0
def print_x():
    x += 5
    print x

it does not know that the variable x exists why is this and how can i resolve this?

Thank you so much if you know this answer!

Aucun commentaire:

Enregistrer un commentaire