Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

When I go to Idle, then to python shell then click on File and New Window, an Untitled window appears. But how do I then enter a program?

MIT 6.00 Intro Computer Science (OCW)
I got my questions answered at in under 10 minutes. Go to now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly


Get your free account and access expert answers to this and thousands of other questions

Your program is the code that you write in that window. For example - If you wanted to print the famous "Hello, world!", you would type this code in that empty window: Print "Hello, world!" You will have to save it first, before running it.
The problem I'm having is that the Untitled window really is empty, e.g., it doesn't have the characteristic >>> on it. If I type Print 'hello, world' and enter it, then nothing happens.
It's supposed to be that way. Type your code without the prompts (>>>) in that window. Save that code somewhere on your computer and then press f5, in that same window where you wrote the code, to run it. The code you just typed will run in the SHELL. Python knows automatically where the prompts are, so if you have no errors, it will do what you wrote. Think of that new window as your own .py document that you are working on until you test drive it.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Thanks Aslander, so far so good. What you said to do worked fine when I typed in Print 'Hello, world'. But when, instead, I typed in 2**3, then saved it, then typed F5, I just got >>> on the python shell without the answer. Did I do something wrong?
Dear Aslander, O.K. Thanks to you, I think I finally have it all straight now so that I can write a program, save it, run it, change what's wrong, etc. I didn't know about pressing F5 until you told me. Is that written down somewhere in the official Python intstructions? Thanks again for your help.
No - that is just a shortcut. You can find more if you open your Shell and click any menu heading like Format or Run. The keyboard shortcuts are written right beside the function you want. As for why 2**3 did not print - I am not entirely sure, but you would need to add the print command before the 2**3 to print the answer when running it. Like this: print 2**3
Thanks for all the helpful info. Can you help with this further question? When I click on IDLE that puts me into the Python Shell, all right. But I can't find any menu heading there like Format or Run. If I click on Help in the Shell then that tells me that "somehow" Format is under the Edit heading, but that seems to lead me nowhere.
Oh - The menu items I was referring to are found when you open a "New Window".

Not the answer you are looking for?

Search for more explanations.

Ask your own question