Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

liaoee

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!

  • 10 months ago
  • 10 months ago

  • This Question is Closed
  1. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • 10 months ago
  2. bwCA
    Best Response
    You've already chosen the best response.
    Medals 1

    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.

    • 10 months ago
  3. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    thanks guys! so it's a blank page. Do I need to add anything before getting started?

    • 10 months ago
  4. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    Just the comments for the assignment are the only thing I can think of until you start importing things.

    • 10 months ago
  5. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    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?

    • 10 months ago
  6. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    also are we encouraged to asked questions, or look up previous questions? if the latter, how do i do so?

    • 10 months ago
  7. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    For looking up questions you can use the codeacademy forum or google.

    • 10 months ago
  8. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    When you say that your code didn't work, what "did" it do?

    • 10 months ago
  9. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    it didn't prompt me for anything, and it gives back whatever i type

    • 10 months ago
  10. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    You are typing in the editor and using F5 to run it?

    • 10 months ago
  11. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    ah... that's why

    • 10 months ago
  12. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    nice it works!

    • 10 months ago
  13. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    Thank you so much. I'll keep working on it.

    • 10 months ago
  14. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    You're welcome. Check out PyScripter if you have some free time. I personally prefer that over the IDLE editor.

    • 10 months ago
  15. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    could you explain that to me a bit? like the difference between terminal and editor etc?

    • 10 months ago
  16. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    so i downloaded python, and then idle. did i need idle?

    • 10 months ago
  17. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    IDLE comes with Python, once you download and install the package you will have all you need to write in Python.

    • 10 months ago
  18. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    The PyScripter is an IDE for Python, basically the same as the IDLE editor, just with a better user interface.

    • 10 months ago
  19. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    The difference between an editor and terminal, is that in the terminal your commands are processed as soon as you hit the enter key.

    • 10 months ago
  20. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    so what's the difference between command line and GUI?

    • 10 months ago
  21. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    i just noticed that one is black and one is white

    • 10 months ago
  22. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • 10 months ago
  23. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    but idle is terminal, right? and it's GUI?

    • 10 months ago
  24. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    Technically IDLE is a GUI for the terminal.

    • 10 months ago
  25. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    so GUI is basically just a better looking terminal, and the editor is where we actually write a program

    • 10 months ago
  26. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    and then what's IDE?

    • 10 months ago
  27. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    Well a GUI is a graphical representation for many interfaces, most likely you are using a GUI web browser to view this page. :)

    • 10 months ago
  28. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • 10 months ago
  29. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    got it! thnx!

    • 10 months ago
  30. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    You're welcome.

    • 10 months ago
  31. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    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...?

    • 10 months ago
  32. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    The parenthesis aren't necessary. They most likely give away that the person writing the program was a 'C' programmer.

    • 10 months ago
  33. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    i see..

    • 10 months ago
  34. liaoee
    Best Response
    You've already chosen the best response.
    Medals 0

    so for pset 0 that was it right? three lines? no loops?

    • 10 months ago
  35. bwCA
    Best Response
    You've already chosen the best response.
    Medals 1

    version 3+ of Python requires parens for the print function

    • 10 months ago
  36. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    @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.

    • 10 months ago
  37. eSpeX
    Best Response
    You've already chosen the best response.
    Medals 0

    And yes, that was it for your ps0, the bulk of the assignment was getting Python installed and familiarizing you with entering code.

    • 10 months ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.