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.

I'm on lecture 3, however I need some help with the first assignment with the program that asks your your name and d.o.b, I keep getting syntax errors and I have no idea why... Is there a source that can explain all syntax errors on this version of Python?

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

What errors are you getting? Paste your code and I'll try to help you debug it! :)
@ChrisJordan And if you tag me in the post I'll know when you've pasted it. Thanks!
Yes, please post your code. Pastebin is pretty good for that stuff :)

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Will do as soon as I get off of work at 6pm est.
I've just done this assignment. Without seeing your code, I suppose there are a couple of places that syntax errors may occur. 1. Ensure that you have enough brackets with your raw_input command. 2. Ensure that you enclose your prompt in quote marks. 3. A good idea also is to ensure that your date of birth variable is a string type. I'll give a different example to the assignment: e.g. gen = str(raw_input('Enter your gender:')) Notice two open brackets, two closed brackets. Also notice the quotes around the prompt. Hopefully these are your only errors - when you show the code you will get a definite answer. Cheers
NameError: name 'x' is not defined
1 Attachment
I will probably figure out that it is a silly mistake
Hmmm.... It looks like you are using the command line there. Are you using the IDLE GUI to write out your code?
The attached file might help? Please other people let me know if I'm on the complete wrong track too as I'm only new to this too! If you are using a windows machine, download the file, then right click on it and choose "Edit with IDLE". Two windows should open. One is the editor and one is the shell. The example code will hopefully help.
Of course it helps if I attach the file...
Dear ChrisJordan, I have figured your problem out. The main problem of your code was that you did type a command during the execution of a command. You cannot give command during the execution of another command. When you typed >>>print raw_input('What is you date of birth?") that means your program is expecting a value to set in a variable not defined and here in the place of a value you can not call a function as it would take the function calling command as a string value of a non defined variable.Thus in the next line x has no value assigned,even it doesn't really exist and it gives a error saying x is not defined.You should try writing the following code in the first line of your program which will definitely work >>>x=raw_input("What is your date of birth?\t") remember that you can't use the print method here.But later you can write code like >>>print x My English is not good so thank you very much for reading this comment hope it will help you out.
Okay, I think I figured out Problem Set 0 out. Can one of you kind people please take a look at the attached file, let me know if this is correct and sufficient to complete the assignment?
1 Attachment
Ahh! Imagine that is what it is except add the word "birth" in lol!

Not the answer you are looking for?

Search for more explanations.

Ask your own question