Ace school

with brainly

  • Get help from millions of students
  • Learn from experts with step-by-step explanations
  • Level-up by helping others

A community for students.

I am starting Pset 0. How do I write a program in IDLE. As in, I want to be able to write more than one line of code before IDLE runs my code. Thanks!

MIT 6.00 Intro Computer Science (OCW)
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com 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.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

You can either use an editor to write your code and IDLE to run it, or grab a program called PyScripter, http://code.google.com/p/pyscripter/, lovely little ide for python that is free.
from the IDLE shell window you can open an editor window with menu item File | New Window after you have written code in the editor, F5 will run it with the results displayed in the shell window. be sure to save files with a .py extension to preserve the syntax highlighting.
thanks guys! so it's a blank page. Do I need to add anything before getting started?

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Just the comments for the assignment are the only thing I can think of until you start importing things.
i tried running this: x = raw_input('Please enter your birthdate (mm/dd/yyyy): ') y = raw_input('Please enter your last name: ') print x + y but it doesn't work.. am i missing something?
also are we encouraged to asked questions, or look up previous questions? if the latter, how do i do so?
For looking up questions you can use the codeacademy forum or google.
When you say that your code didn't work, what "did" it do?
it didn't prompt me for anything, and it gives back whatever i type
You are typing in the editor and using F5 to run it?
ah... that's why
nice it works!
Thank you so much. I'll keep working on it.
You're welcome. Check out PyScripter if you have some free time. I personally prefer that over the IDLE editor.
could you explain that to me a bit? like the difference between terminal and editor etc?
so i downloaded python, and then idle. did i need idle?
IDLE comes with Python, once you download and install the package you will have all you need to write in Python.
The PyScripter is an IDE for Python, basically the same as the IDLE editor, just with a better user interface.
The difference between an editor and terminal, is that in the terminal your commands are processed as soon as you hit the enter key.
so what's the difference between command line and GUI?
i just noticed that one is black and one is white
Command line typically refers to a terminal, like if you were to open the "command prompt" in windows. GUI stands for Graphical User Interface, and typically refers to a "windowed" environment.
but idle is terminal, right? and it's GUI?
Technically IDLE is a GUI for the terminal.
so GUI is basically just a better looking terminal, and the editor is where we actually write a program
and then what's IDE?
Well a GUI is a graphical representation for many interfaces, most likely you are using a GUI web browser to view this page. :)
An IDE is and Integrated Development Environment. It brings together many of the tasks associated with programming into a nice user interface. You are presented with buttons to build your program, vs having to run a command on the command line.
got it! thnx!
You're welcome.
hey when does print need parenthesis after it? i saw an example where if the variable is called x, no parentheses are used, and another where the variable is "changing," and parenthese were used...?
The parenthesis aren't necessary. They most likely give away that the person writing the program was a 'C' programmer.
i see..
so for pset 0 that was it right? three lines? no loops?
version 3+ of Python requires parens for the print function
@bwCA beat me to it, I started playing with 3.x last night and discovered that the parenthesis were in fact required. There are some other changes as well that can create a learning speed-bump, so I'd suggest you stick with 2.7.x until you are more familiar with the language.
And yes, that was it for your ps0, the bulk of the assignment was getting Python installed and familiarizing you with entering code.

Not the answer you are looking for?

Search for more explanations.

Ask your own question