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 just did problem set #0 from lecture 1 . i wrote the program but am not sure if its correct it works in python but when i save it as i enter the birth and then the last name and it disappears

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

How are you trying to run the code?
Show us the code. It's almost always extremely hard to help someone based on a vague description of what's going on...we need the specifics.
I think it might be an issue with Python....i have seen so many times it lost the connection. Please try to save your code one more time by deleting your file and run it again. I am sure this will work.
1 Attachment

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

this is normal operation Python, just add raw_input() in the end, and you can run this program
or open this file in IDLE and click F5
my first message about run in command line
this is my code
1 Attachment
sorry for not checking this sooner but the code i wrote is x = str(raw_input('Enter date of birth: ')) y = str(raw_input('Enter last name: ')) print (y) + (x)
Okay, first of all, there's nothing really wrong with your code. Two minor points: 1) You don't have to use the str() function, because raw_input() returns a string as is. 2) If you want a space in between y and x when you print them, you have a couple of options. You can do "print y + ' ' + x" (no parentheses necessary" or you could do "print y,x"...if you separate by a comma, it puts a space in between that data. Or you could do "print '%s %s' % (y,x)" which formats the data for you. It's mostly a matter of taste. So...the real question is "Why does everything disappear?". I'm going to take a guess here: you are not running your code in IDLE, you're running it by creating the file, and then looking for the file and double clicking on it. Am I right? To run your code in IDLE, open up IDLE, open up the file, and then hit F5. It will run in the IDLE window. If you really want to be able to double click on your file and not have it close immediately as soon as it's done running (this is a perfectly reasonable thing to want to do), then you can fix this by simply adding another raw_input() function as the very last line of your code. Then your code will wait for you to press Enter before it closes.
thank you so much that helped me a lot, greatly appreciated
search in yours programs python (GUI), can copy you code or open here, run F5

Not the answer you are looking for?

Search for more explanations.

Ask your own question