Your first program

Using IDLE or your favorite text editor, type the following program and save it into a file called hello.py:
      name = raw_input('What\'s your name? ')
      print 'Hello', name
      print 'It\'s nice to meet you.'
    
Several interesting things are going on here:
  1. The raw_input function will print a prompt, wait for the user to type something, and return the resulting text, which gets assigned to the variable name.
  2. There is a single quote ' in the prompt. We have to "escape" it using a back-slash.
  3. The print command is followed by a string literal ('Hello') and a variable (name). These are separated by commas. They will be separated by a single space, when printed.