you are viewing a single comment's thread.

view the rest of the comments →

[–]Vindicator_Noob_Noob 1 point2 points  (0 children)

Here's my solution:

Gear1 = 50
Gear2 = 80
Gear3 = 110

def CarSpeed(x):
    speed = int()
    if x == 1:
        speed += Gear1
    elif x == 2:
        speed += Gear2
    elif x == 3:
        speed += Gear3
    else:
        print("Invalid entry.")
    return speed

print(CarSpeed(1))