File tree Expand file tree Collapse file tree 7 files changed +17
-16
lines changed
primer-on-jinja-templating Expand file tree Collapse file tree 7 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1- click == 8.1.3
2- Flask == 2.1.2
3- itsdangerous == 2.1.2
4- Jinja2 == 3.1.2
5- MarkupSafe == 2.1.1
6- Werkzeug == 2.1.2
1+ blinker == 1.8.2
2+ click == 8.1.7
3+ Flask == 3.0.3
4+ itsdangerous == 2.2.0
5+ Jinja2 == 3.1.4
6+ MarkupSafe == 2.1.5
7+ Werkzeug == 3.0.3
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def brake(self, value):
3434 print (f"Braking to { self .speed } km/h..." )
3535
3636 def __str__ (self ):
37- return f"{ self .make } , { self .model } , { self .color } : ({ self .year } )"
37+ return f"{ self .make } { self .model } , { self .color } ({ self .year } )"
3838
3939 def __repr__ (self ):
4040 return (
Original file line number Diff line number Diff line change @@ -16,4 +16,4 @@ def radius(self, value):
1616 self ._radius = value
1717
1818 def area (self ):
19- return round ( math .pi * self ._radius ** 2 , 2 )
19+ return math .pi * self ._radius ** 2
Original file line number Diff line number Diff line change 11class A :
22 def method (self ):
3- print ("A.method" )
3+ print ("A.method() " )
44
55
66class B (A ):
77 def method (self ):
8- print ("B.method" )
8+ print ("B.method() " )
99
1010
1111class C (A ):
1212 def method (self ):
13- print ("C.method" )
13+ print ("C.method() " )
1414
1515
1616class D (B , C ):
Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ def __init__(self):
3737 self .position = 0
3838
3939 def move_up (self , distance = 1 ):
40- self .position += 1
40+ self .position += distance
4141 print (f"Moving arm { distance } cm up..." )
4242
4343 def move_down (self , distance = 1 ):
44- self .position -= 1
44+ self .position -= distance
4545 print (f"Moving arm { distance } cm down..." )
4646
4747 def weld (self ):
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def __init__(self, radius):
2121 self .radius = radius
2222
2323 def area (self ):
24- return round ( math .pi * self .radius ** 2 , 2 )
24+ return math .pi * self .radius ** 2
2525
2626
2727class Square :
@@ -31,4 +31,4 @@ def __init__(self, side):
3131 self .side = side
3232
3333 def area (self ):
34- return round ( self .side ** 2 , 2 )
34+ return self .side ** 2
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ def side(self, value):
1313 self ._side = value
1414
1515 def calculate_area (self ):
16- return round ( self ._side ** 2 , 2 )
16+ return self ._side ** 2
You can’t perform that action at this time.
0 commit comments