-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWheel.py
45 lines (31 loc) · 844 Bytes
/
Wheel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 14 16:29:38 2018
@author: Reegan
"""
import math
class Wheel:
"""Class describing a bicycle wheel"""
#put any class variables here
Number = 0
def __init__(self):
#object properties
#wheel diameter
self.Diameter = None
#rolling resistance coefficient
self.Crr = None
#add 1 to number of wheels
Wheel.Number += 1
def Radius(self):
return(self.Diameter/2)
def Circumference(self):
return(self.Diameter*math.pi)
@classmethod
def Count(cls):
return(cls.Number)
"""this function will run if Bike.py is run from a shell"""
def main():
w = Wheel()
print(w)
if __name__ == "__main__":
main()