(Aug-22-2019, 09:52 AM)TomJS Wrote: Thanks for the reply's but its still not working...Is this answer ever gone be useful,do you show what you tried

Okay here a little more help using your code code.
Do not capitalize every variable,function,..ect PEP-8.
import msvcrt import time import random import sys def start(): input("Press ENTER to start") print("On your marks...") time.sleep(random.uniform(2, 5)) print("Set...") time.sleep(random.uniform(0.5, 2)) print("GO!") distance = 100 race(distance) def race(distance): travelled = 0 while travelled != distance: move1 = msvcrt.getch() if move1 in b'\x00': move1 = msvcrt.getch() if move1 == b'a': travelled += 20 print(travelled) if move1 == b'q': print('You quit the race') sys.exit() else: print(f'Key Pressed: {move1}') print(f'You reach the end distance: <{distance}>') start()Test pushing
a
:Output:E:\div_code\foo
λ python -V
Python 3.7.3
E:\div_code\foo
λ python key_in.py
Press ENTER to start
On your marks...
Set...
GO!
20
Key Pressed: b'a'
40
Key Pressed: b'a'
60
Key Pressed: b'a'
80
Key Pressed: b'a'
100
Key Pressed: b'a'
You reach the end distance: <100>
Test pushing q
:Output:E:\div_code\foo
λ python key_in.py
Press ENTER to start
On your marks...
Set...
GO!
20
Key Pressed: b'a'
40
Key Pressed: b'a'
You quit the race