Introduction to Strings
A string variable contains some text. Run the following program:
Note the output. The program shows that you can “add” strings and it’s not the same as
mathematical addition. User input of strings is done using raw_input and input which is for
numbers, see the following program:
Exercise 1
String can also be numbers. Write a program where the user inputs their first name, second
name, and Swedish personal number. The program “adds” these and then prints their name
and personal number in one lines.
Strings can be numbers
A string can include number characters, but the python interpreter does not treat it
mathematically, so using strings 1+1=11 (and not 2).
Computer Experiment 1
Run the following program a few times using different inputs, and note the values of c :
Change raw_input to just input and run the program again, and note the value of c.