With Ms Hind

Inputting information and strings

print() function

The print function prints information to the screen. Type this in:

print (“Hello World”)

The input function allows the user to enter information into the computer. Type this in:

name = input("Hi. What's your name? ")

print ("Hello, ", name)


A variable is used in a program to store information. In the program above the variable is name. Because the variable is in quotes “” or ‘’, the variable type is called a string.


A string can contain letters, characters and numbers.

Challenge 1 - Write a program that….

  1. Asks for the first name and then a surname.

  2. Print the First name and then the second name

  3. On the next line print the second name and then the first name

Extension: The name may not have a space between first and second names, can you work out how to add one?

Save as: Challenge 1 - Names