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.

Just wondering if this is a good way to do problem set 0 for the spring course: x = raw_input('Please enter your birth date: ') y = raw_input('Please enter your last name: ') print (x +' ' + y)

MIT 6.00 Intro Computer Science (OCW)
See more answers at
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


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

hey if you don't mind me asking, what programming language is that?
That looks good to me green but I don't think you need to put them in parenthesis. @LanHikari22 This is Python.
What J.Soto is saying is mostly correct. You are mixing 2.x and 3.x type commands. `x = raw_input('Please enter your birth date: ')` is a 2.x command for getting input and needs parentisis. In Python 2, before 2.7.x, the print command was: `print "bla"` In Python 3 and the 2.7.x bridge, the print command was changed to a function and you use" `print ("bla")` However, pythin 2.7.x can actually use both: ``` Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> print "a" a >>> print ("a") a >>> ```

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

FYI, print (x +' ' + y) can also be written: print x, y (Python2 syntax). The comma will give you a space between the variables. In a simple program like this it's not too important what the variables are named. As programs get bigger and more complex, useful variable names can make reading the code MUCH easier. For instance: birthDate = raw_input( " Please enter your birth date: " ) Never too early to start good habits!

Not the answer you are looking for?

Search for more explanations.

Ask your own question