How to use Python 3

I would like to use Python 3 instead of 2 for the quizzes. I have the IDLE interface opened on my computer, but is there any way that I can paste my answer into the answer box? I have had to resort to using print(my answer) in their box since it doesn't seem that I can paste directly into the answer box.

asked 28 Feb '12, 09:31

idoun's gravatar image

idoun
11257
accept rate: 0%


3 Answers:

it will not work, the syntax is different even for print
Stick with 2.6/2.7 else you're always looking for trouble figuring out the differences.

link

answered 28 Feb '12, 09:41

Angel's gravatar image

Angel
7.0k632112

I've been using Python 3 intermittently for the past few months so I learned some of the differences, including the print() function, the hard way, and didn't want to confuse myself again by going to 2.6/2.7. I also have Python 3 on my computer.

link

answered 28 Feb '12, 09:48

idoun's gravatar image

idoun
11257

Without starting a war about which version is better, I personally have only 3.1 on my computer at home but it will be very helpful to also learn 2.7 since so much legacy code is written in it.

One option I am using is Repl.it which has an online implementation of 2.7.2. I would suggest testing homework in that for the time being.

What would be nice is if Udacity put a footnote in the "Instructor Comments" where a particular piece of code in the lesson was only for 2.7 and a link to Python documentation on how it worked in 3.0 or higher. IMHO.

link

answered 28 Feb '12, 09:59

Charles%20Caldwell's gravatar image

Charles Cald...
13234

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,324
×10

Asked: 28 Feb '12, 09:31

Seen: 140 times

Last updated: 28 Feb '12, 09:59