lec-10-2

lec-10-2 - 1 ECS 10 10/2 Announcements Second program due...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 ECS 10 10/2 Announcements Second program due Tuesday night. I will be at Monday lab hours. Last time getting user input name = raw_input(What is your name? ) This is an assignment statement. name is a variable name is a variable. The value of: raw_input(What is your name? ) .will be whatever the user types as input. Enter to exit Enter to exit Many examples in the book end with: Many examples in the book end with: raw_input(Press enter to exit) Python waits for the user to enter something. Python waits for the user to enter something. As soon as the user hits the enter key, the As soon as the user hits the enter key, the program is done and it exits. program is done and it exits. Notice the value produced by Notice the value produced by raw_input raw_input() is () is not put into a variable; it is just thrown away. not put into a variable; it is just thrown away. 2 The empty string When the user just types the Enter key, raw_input() produces a string, but it is a string...
View Full Document

Page1 / 4

lec-10-2 - 1 ECS 10 10/2 Announcements Second program due...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online