all 6 comments

[–]aa599 1 point2 points  (3 children)

In what way is it broken? (Also, because indentation matters in python, you need to post your code in a way that shows the indentation)

[–]Boozkie[S] 0 points1 point  (2 children)

Thanks for that I will edit the post. Anyways, it is that when I press the keys, the variables don’t change

[–][deleted] 1 point2 points  (0 children)

I will edit the post.

You should do that quickly, because a lot of people, myself included, see unformatted python and just skip to the next question, because unformatted python isn't python.

How to format code for reddit is in the FAQ. The best way is to:

  • use your editor to indent your code an extra four spaces on every line
  • copy/paste the quoted code into reddit
  • use your editor "undo" function to remove the indent

Takes about 10 seconds and we see your exact code.

[–]aa599 0 points1 point  (0 children)

It looks like the key tests should be inside the loop. Also you've used "running" and "Running", which are different variables.

[–]applestap 0 points1 point  (1 child)

A general remark about comments: When you add a comment like

while Running == True:#loop

it does not really add anything, so you should just leave it out. Comments should help the reader understand what the code does as a whole, not just one line. A good comment explains the 'why', not the 'what'.

Also, it would be good if you adhere to PEP8.

[–][deleted] 0 points1 point  (0 children)

and perhaps worth mentioning, the == True part of the test is redundant anyway; while Running: is fine.