LESSON 01 – PROGRAMMING BASICS

 


LESSON WORK

PROGRAM 1 - OUTPUT

Make a program that outputs your name to screen.  Make sure there is a comment at the top with your name and with a description of the program.

 

PROGRAM 2 - NEXT

Write a program that asks the user for a number and it outputs “The next number is number + 1.

 

PROGRAM 3 – LICENSE PLATE MAKER

Ask the user for their name.  Ask the user for their favourite number.   Combine the two for their future personalized licence plate and output.

 

PROGRAM 4 - ARITHMETIC

Use Python to solve the following math arithmetic problems:

a) What are the values of 210, 220 & 230?

b) What is the remainder of 1503 divided by 7? (Use the % symbol.)

c) What is the square root of 500?  (Square root is the same as exponent 0.5)

 

PROGRAM 5 - TRIANGLE

Ask the user for two side lengths of a right angle triangle and use the Pythagorean theorem to solve for the length of the hypotenuse.