1 | class Car:##类名 |
输出1
2
3
4
5
6
7
8
9
10
11
12
13"C:\Program Files\Python36-32\python.exe" C:/Users/15581/PycharmProjects/untitled6/Car.py
I'm a car!
What should I do? [A]ccelerate, [B]rake, show [O]dometer, or show average [S]peed?A
I'm going 5 kph!
What should I do? [A]ccelerate, [B]rake, show [O]dometer, or show average [S]peed?B
I'm going 0 kph!
What should I do? [A]ccelerate, [B]rake, show [O]dometer, or show average [S]peed?S
The car's average speed was 2.5 kph
I'm going 0 kph!
What should I do? [A]ccelerate, [B]rake, show [O]dometer, or show average [S]peed?O
The car has driven 5 kilometers
I'm going 0 kph!
What should I do? [A]ccelerate, [B]rake, show [O]dometer, or show average [S]peed?