I can't believe I'm stuck on PS0 . Help? Please :(
Hey. Ok, What is it you are stuck with? :)
Good question. Haha. Um, the third step's kind of baffled me - 'Prints out the user’s first and last names in that order.' How would I go about doing that? Btw, PS0 is only after the first lecture, right? Because I don't think I've learnt enough so far to deal with the problem.
I not sure about the ordre of the problems, I just try, and if they don't make any sense, I watch another lecture. But you should be able to do ps0. So, if the third step is the problem, you should already have the first and the last name bound to something. Then all you need to do is print out the names, and you can do that with a simple "print". Eg. "print firstname, lastname" (replace firstname and lastname with whatever you bound the input to) :) If there still a problem, let me se your code, and we'll figure it out!
Give us some code so we can see what you are (and arent) doing. Also, If you want to know when a problem is due, check the calendar on the course website.
This link was put up by another poster, it might help you http://screencast.com/t/MTrBO0BfdlSC
If you look at the course's calendar (one of the links on the left) you can see a list of all the lectures and on the right, when the problem sets are assigned and due. So if something is marked as "OUT" on lecture 4 and "DUE" on lecture 6, this tells me it will be working from the information learned in lectures 4 and 5. However, make sure you do the reading because the lectures focus more on the logic of computer science while not really touching on the syntax of implementing it. It's your job to pick that up from the readings and outside sources. As for the OP's post. The function you'd like to use is called "print" which will display a string on the screen. Check out the following example and pay attention to where the quotes are, indicating what is a string and what is a variable name Ex. print 'Ford' Ford Make = Ford print Make Ford Taurus = Taurus print Make+Model FordTaurus Car = Make+' '+Model print Car Ford Taurus Hope that gives you a good jumping off point!
Thanks guys. Sorry, I don't really know what I was doing. I didn't realise that you had to put your code into a new window before running it... Yeah, I'm a bit of a noob.. But again, thanks. And damn, I'm happy - I just finished my first problem set ! :D
question = "Enter your last name:" print question answer1 = raw_input () question2 = "Enter your first name:" print question2 answer2 = raw_input () print answer2 print answer1
@fractal27 - That's exactly what I needed !
Join our real-time social learning platform and learn together with your friends!