calthoff / self_taught

This repository contains the exercises for "The Self-Taught Programmer: The Definitive Guide to Programming Professionally."
http://theselftaughtprogrammer.io
267 stars 226 forks source link

Example keeps asking me to save even after I save... #8

Closed MKimble515 closed 6 years ago

MKimble515 commented 7 years ago

``x = 100 if x == 10: print("10!") elif x == 20: print("20!") else: print("I don’t know!")

if x == 100: print("x is 100!")

if x % 2 == 0: print("x is even!") else: print("x is odd!")

When I use the F5 key to run(in the test editor), I keep getting a message to save. This doesn't happen with other code, just this particular one. Update- I retyped the code myself and it worked fine. I tried repeatedly to be able to save the code above using copy and paste, but for some reason it would not save it.

calthoff commented 7 years ago

@MKimble515 Weird. Not sure what happened!

VetAran commented 7 years ago

Sometimes I run into this and I have noticed it does so when I inadvertently open or Ctrl + N two or more documents. If you close them all and restart IDLE Shell (Ctrl + F6) it often corrects this squirrely behavior.