Exercises for week 3
Ex3a1 Create a program that calculates to yearly salary
- use input to ask for monthly salary
- use input to ask for a bonus
Ex2a2 Binding names
- Bind the name
x
to a literal with value 42. Bind the namey
to the square ofx
. Make sure, that both values are correct.
Ex2a3 The Life of a Variable
- Type this code at the REPL and note what happens. Is the result what you expected?
>>> x = 7 >>> y = 12 >>> z = x * y >>> z = 10 >>> z
Ex2a3 Using text
- Can you figure out how to print text in the REPL?
Back to the 02_ready | Next chapter |