Program 3: Pocket Money Calculator

This program calculates a teenager’s pocket money on a monthly and yearly basis. It also calculates how much pocket money they will earn before they are 18.

You can see the code and output below, or you can access it on repl.it by clicking here.

Code

Output

New Constructs/Concepts

Calculations

This program shows how we can use mathematical symbols to perform calculations within our program. This is often combined with variable assignment in order to set a variable to the result of a calculation (which could involve the use of other variables).

The following mathematical symbols can be used.

SymbolMathematical Symbol
+Plus
Minus
/Divide
*Multiply
^Exponent (to the power of)
ConstructLine(s)Python SyntaxPurpose
Calculations11, 14, 17+, -, /, *, ^To perform an addition, minus, division, multiplication, exponent

Parson’s Problem

This program is designed to get the temperature in degrees celsius, then convert it to fahrenheit and display both temperatures.

Report a Glow concern
Cookie policy  Privacy policy

Glow Blogs uses cookies to enhance your experience on our service. By using this service or closing this message you consent to our use of those cookies. Please read our Cookie Policy.