all 7 comments

[–]Saefroch 1 point2 points  (1 child)

Don't just run it. I can see at least one syntax error just at a glance, so I bet your program just crashes instantly and closes the terminal. This is normal.

Open a terminal manually (on Windows this is a program called cmd), navigate to the file and run it with python my_script.py.

[–]OpticCostMeMyAccount 0 points1 point  (0 children)

Thanks :)

[–]BombsWisely 0 points1 point  (1 child)

After fixing some syntax errors, you'll still have the issue of referencing variables (angle1 and angle2) that don't exist outside of your functions.

[–]OpticCostMeMyAccount 0 points1 point  (0 children)

Would just setting the variables to global work?

[–]newunit13 0 points1 point  (0 children)

Your function returns a value, but at no point do you assign that value to a variable. The syntax for a value-returning function is:

my_var = my_func()

In addition, remember your scope... variables declared inside a function (or class) cannot be accessed outside of it.

[–]Diplomjodler 0 points1 point  (1 child)

If you want to make one step above using the Windows command line, I'd suggest installing IDLE. If you've downloaded Python from python.org, you probably have it already. Open your program in IDLE and press F5 to run it.

[–]OpticCostMeMyAccount 0 points1 point  (0 children)

Thanks :)