Python Forum
Area, Perimeter Calculator. Help Pls.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Area, Perimeter Calculator. Help Pls.
#11
That's because the decision variable is defined in the my_function function, and thus does not exist outside of it. You need to add return decision to the end of your function, and then call it and assign it to x (x = my_function().

You should read a functions tutorial. There's a link to one in my signature, below.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020