wow i feel horrible i cant get past set 0 problem 1 can someone help me plz?
MIT 6.00 Intro Computer Science (OCW)
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
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.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
what are you having trouble with, can you post the code you currently have?
.... and did you read the Hint in the problemset?
this is what i have done far and i did something really wrong
Not the answer you are looking for? Search for more explanations.
>>> print raw_input('Enter first name')
Enter first name
>>> print raw_input('Enter last name')
Enter last name
the computer doesnt know where to store the values that you are asking for
also raw_input kind of acts like a print... try doing the code without print and see what happens
First of all, the problem asks you to write a program which asks for the LAST name first and the FIRST name second, then spits the name back at you in the right order. You need your program to rearrange the user input so that the first name comes before the last name. Once you figure out how to do this you'll realize what you are missing. BTW, you don't need to put print before raw_input.
the last paragraph of the Hint in the problemset has a link to the variable/string entry of the Python wikibook - that might help you
link to the variable/string entry in Python wikibook and link to the solutions to the example problems at the bottom. I found that most helpful in solving that problem
my output scrolled off the screen
i used the code below
trythis = raw_input('hit the enter key')
it waits for a carriage return
You need to assign the value returned by the raw_input function to some variable, as in
a = raw_input()
You only pass a string of text to raw_input if you wish to create a prompt. When raw_input is called, it prints the prompt and then waits for a response from the user, that is whatever the user types before pressing enter ~ potentially nothing, returning an empty string.
If we do
stuff = raw_input('write here ->')
the computer will print the prompt
write here ->
then wait for someone to enter something after the prompt. If you typed
spam and eggs
then pressed enter, the raw_input function returns the string 'spam and eggs' which in the above case is assigned to the variable named stuff. If you now do
The computer will print the value of the variable stuff, in our case
spam and eggs
Hope that helps.