anonymous
  • anonymous
I'm stuck on problem set zero (you can start laughing). I can get raw_inputs to be stored in variables, to where I can just type in the variable that I have them into IDLE and be returned with the appropriate string. However, the problem I'm having is getting the code to run in a sequence. For instance, if I do FirstName = raw_input ('Enter Last Name') LastName = raw_input ('Enter First Name') It will query me for my last name and stop. I guess it's sequencing that I'm having issues with. Thanks for any potential help.
MIT 6.00 Intro Computer Science (OCW)
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 our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions.

anonymous
  • anonymous
I'm stuck on problem set zero (you can start laughing). I can get raw_inputs to be stored in variables, to where I can just type in the variable that I have them into IDLE and be returned with the appropriate string. However, the problem I'm having is getting the code to run in a sequence. For instance, if I do FirstName = raw_input ('Enter Last Name') LastName = raw_input ('Enter First Name') It will query me for my last name and stop. I guess it's sequencing that I'm having issues with. Thanks for any potential help.
MIT 6.00 Intro Computer Science (OCW)
katieb
  • katieb
See more answers at brainly.com
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

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
do you enter your last name?
anonymous
  • anonymous
I noticed that I kinda flubbed up the variables, but no, it doesn't allow me to enter my last name.
anonymous
  • anonymous
By which I mean first name. I'm confusing myself here.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
when this is executed FirstName = raw_input ('Enter Last Name') you should see Enter Last Name do you see it?
anonymous
  • anonymous
Yes. My issue is when I put my (fixed) LastName = raw_input ('Enter Last Name') command with my (also fixed) FirstName = raw_input ('Enter First Name'), it only queries me for my last name.
anonymous
  • anonymous
so click on keyboard something and press enter
anonymous
  • anonymous
Let me copy/paste what's going on in my IDLE screen. >>> x = raw_input ('Enter Last Name') y = raw_input ('Enter First Name') Enter Last Name Test >>>
anonymous
  • anonymous
X being LastName and Y being FirstName.
anonymous
  • anonymous
My first issue is that it is not querying me for my first name after I enter my last name.
anonymous
  • anonymous
well i have never used IDLE but your code is ok :D
anonymous
  • anonymous
I'm using Idle, saved your code and was prompted for first and last.
anonymous
  • anonymous
do you have to save code to a file.py? or you just type code in console?
anonymous
  • anonymous
assuming the answer you put in for last name was "Test"
anonymous
  • anonymous
I'm typing the code in Notepad and copy/pasting it into IDLE, making sure that I don't miss a bit of code. It may very well be that I need to update Python. I'll be back in about 15 minutes after I update it.
anonymous
  • anonymous
If you're using IDLE, in the Python Shell, go to file,and open a new window. use this to write your code and save it as a .py file you have to save in order to run the whole program.
anonymous
  • anonymous
copy pasting may be not good
anonymous
  • anonymous
try to enter each line into IDLE or from notepad you can save to file.py and run it
anonymous
  • anonymous
Bit too late now; I've already started uninstalling Python. But I swear... if it's saving it in a .py file that it was... Oh, those minor details. Will try it after updating Python to 3.
anonymous
  • anonymous
don't update to 3!!!
anonymous
  • anonymous
yeah I'm using 2.7.1 , don't go to 3
anonymous
  • anonymous
python 3 is somewhat different
anonymous
  • anonymous
and im pretty sure mistake was copying/pasteing
anonymous
  • anonymous
*won't go to 3 *will instead download python 2 again Alright.
anonymous
  • anonymous
*sigh* It would be the fact that I'm not saving it in a .py file. Thanks for the help, guys!
anonymous
  • anonymous
its not necessery to save it to file, but you cant copy/paste to IDLE if it asks for more than 1 input
anonymous
  • anonymous
it's always the little things.
anonymous
  • anonymous
try this print (raw_input("Enter the Last Name: ")+"\n"+raw_input("Enter the First Name: "))
anonymous
  • anonymous
The problem could be you're pasting from notepad which uses the windows \r\n characters for line returns which isn't compatible with *nix based systems. Notepad is notorious for this. If you're using windows I would suggest Notepad++ which gives you the option of using unix style newline encoding so you won't run into this issue. It also offers line counts and code highlighting for easy reading.

Looking for something else?

Not the answer you are looking for? Search for more explanations.