Skip to content
MathsGenie logo
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

Constructs

EasyMedium
1234567891011121314
Question 5

Oliver has written a Python program to calculate the estimated stopping distance of a bicycle based on its speed.

speed = float(input("Enter speed in m/s: "))
if speed < 10.0:
    stopping_distance = speed * 1.5
else:
    stopping_distance = speed * 2.5

State the value of stopping_distance when the input value for speed is 12.0.

[1]

Constructs Questions

  1. IGCSE
  2. /Computer Science
  3. /Constructs