week 1 challenges

1) Write a personalised greeting - you ask for the user's name and then greet them with a message. 

2) Write a program that allows the user to input their name (string) their age (integer) and their Favorite TV Program and their Favorite Computer Game. (strings)

Then outputs a message like this one...

"Fred is 13 and likes X Factor and Clash of Clans"

You need to use CONCATENATION to do this

Also use a variables to hold the data about the name, age, TV prog and game. .

Tip - You can "CAST" a number to a string like I have below by using the str(variable) command

3

Age Calculator​

​Write a program where it asks the user to enter their name and store it into a variable called name, they should also enter their age and store it into a variable called age.​

The program should then output a personalised message to the user explaining how old they are now and how old they will be in 50 years.​

4)

Write a program that allows the user to input two numbers and then outputs all of the following.

The addition of the numbers

The subtraction of the numbers

The multiplication of the numbers

The division of the numbers

Make the output user friendly - so "Your First number was ........ and Your second number was..... etc.

5) 

Write a program that works out the area of a rectangle

You will need the user to enter the length and width and work out the area with width times Length

If you manage to do rectangles then try with a right angled triangle or / and a circle - could you do a cube?

5)

Python Sleep Challenge

Create a program to calculate how many hours per week you sleep.

(You need to know how many hours in a day, how many weeks in a year, how many months in a year etc. but I'm assuming you know this already)

1) Enter the number of hours sleep per night that the person is having

2) Calculate the number of hours sleep in a week

3) Calculate the number of hours sleep in a month

4) Calculate the number of days of sleep this is in a year.

If you wanted to improve this program you could get the user to enter 7 numbers one for each night in a week and average the sleep for the week.