03 - Variables

Watch the following video, and do the examples shown in the video as they are demonstrated.

Assignment

Write a program that assigns the values 2, 3, and 4 to the variables m, x, and b, respectively, and outputs the value of mx + b.

Save as "03_Variables.py".

Assignment

Write a program that prompts for mass m (in kg), then uses the standard value for gravity in m/s/s as assigned to the variable a to calculate and output force f in Newtons.

Save as "03_Variables_2.py".

Some examples from the video

x = 18

x + 15

g = input ("Enter number here: ")

04 - Modules and Functions