Python exercises for ages 10+

Basic exercises

Part 1

Say hello to the user. Create a variable called x and assign it the value “Hello”. Print the value of x.

Part 2

Add two variables together. Create three variables: x, y, and z. Assign a value of 9 to x, assign a value of 7 to y, and then make z equal to the sum of those two variables. Print the contents of the z variable.

Part 3

Give the yourself a nickname. Declare three variables consisting of your first name, your last name, and a nickname. Write a program that prints out your first name, then your nickname in parenthesis, and then your last name. For example: George (Woody) Washington