Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Interactive 3.1: Using variables in calculations

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

Look at the code below. What is the value of total?

number1 = 15

number2 = 10

total = number1 + number2

a)

5

b)

25

c)

15

d)

150

2.

Look at the code below.

What is the value of marblesEach?

marbles = 16

people = 4

marblesEach = marbles / people

a)

20

b)

12

c)

4

d)

64

3.

Look at the code below.

What is the value of change?

sweets = 0.45

crisps = 0.6

money = 1.2

change = money – (sweets + crisps)

a)

0.5

b)

0.15

c)

-0.15

d)

-0.5

4.

Look at the code below.

What is the value of totalCost?

fish = 1.9

chips = 1.1

numberBought = 5

totalCost = (fish + chips) * numberBought

a)

8

b)

15

c)

7.4

d)

10.6

5.

Look at the code below.

What is the value of totalIncProfit?

profitMargin = 0

totalIncProfit = 0

total = 1000

profitMargin = total * 2

totalIncProfit = total + profitMargin

a)

2020

b)

3020

c)

1003

d)

3000

6.

Look at the code below.

What is the value of num2 if total = 35?

num1 = 10

total = num 1 + num2

a)

15

b)

20

c)

10

d)

25

7.

Look at the code below.

What is the value of num2 if share = 20?

num1 = 10

total = num1 + num2

share = total / 3

a)

25

b)

50

c)

40

d)

30