i was trying to do assignment 0 and how do i get it to ask me my name and store it, is that the purpose of the assignment? cause i can type in the command to ask me my name..a little ambiguous
I don't know if I cheated by peeking ahead in the text. But, on page 45, there is a description of the raw_input() function which asks for input from the user. Actually, I don't think I cheated, because the assignment has a link to that function in the Python Wiki. In raw_input(), you give the user an instruction and it takes on the value of what the user types in. You would assign that value to a variable. For example: >>> myPal = raw_input('What is your name? ') # Entered into the Python interpreter What is your name? Murgatroid # Python interpreter executes and I type in the name >>> print myPal # I enter the instruction to print the value of variable myPal Murgatroid # and it was successfully assigned. >>> Good luck! Gary
yep. It doesn't really matter if you look ahead (and understand it)
Yeah the raw_input function is what is required to do ps0, my solution is below: #Problem Set 0 #Name: Username19 #Collaborators: None #Time: 5-10 Minutes last = raw_input("Please enter last name: ") first = raw_input("Please enter first name: ") print first,last
i imagine that we are expected to use whatever outside resources we can find to learn the Python language - they are not teaching us a programming language we are learning computer science concepts and are expected to learn the language as we go. A good place to start is the Tutorial in the docs that got installed on your computer (F1 from Idle) or the Tutorial in the online docs - http://python.org/doc/
It isn't cheating, after all it said to look at the raw input thing,
Join our real-time social learning platform and learn together with your friends!