-6

enter image description here

I wrote a program in my editor and clicked run(F5). Afterwards, in the python shell, I keyed in the desired inputs. What should i do next to make it start running? Attached picture is python editor and python shell.

Thanks!

Grimthorr
  • 6,856
  • 5
  • 41
  • 53
  • 1
    *What should i do next to make it start running?* ca you explain ? – ZdaR Oct 15 '17 at 09:29
  • Yeah, basically, I don't know what I need to do to indicate to the program that I have already put in all the inputs. I want the program to start running with these input but I can't find any method of making it run. – Shaojie Zhang Oct 15 '17 at 09:31
  • Possible duplicate of [How to get multiline input from user](https://stackoverflow.com/questions/30239092/how-to-get-multiline-input-from-user) – ZdaR Oct 15 '17 at 09:32
  • 1
    Pressing enter will just create another row of input. LOL – Shaojie Zhang Oct 15 '17 at 09:32
  • 1
    You should be using input/raw_input, no one uses stdin.read – TLOwater Oct 15 '17 at 09:33
  • Well, stdin.read appears to me as more convenient as I can deal with any data with just the same code. Whereas, input/raw_input needs to loop through. – Shaojie Zhang Oct 15 '17 at 09:35
  • 2
    Yeah, it seems really convenient when you can't get it to stop taking input. – JJJ Oct 15 '17 at 09:38
  • You can @JJJ you just use CTRL-D - super intuitive for the user – TLOwater Oct 15 '17 at 09:38
  • Please see [Why may I not upload images of code on SO when asking a question?](http://meta.stackoverflow.com/questions/285551/why-may-i-not-upload-images-of-code-on-so-when-asking-a-question) – PM 2Ring Oct 15 '17 at 10:00

1 Answers1

0

Use CTRL-D to stop entering new sys.stdin.read() input. Also don't use this.

https://teamtreehouse.com/community/whats-the-difference-between-sysstdinread-and-input

TLOwater
  • 638
  • 3
  • 13