File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Which of the below alignments are correct?
7
7
abs_area = area_A + area_B +
8
8
area_C + area_D
9
9
10
- - [ ] b
10
+ - [x ] b
11
11
12
12
abs_area = area_A + area_B
13
13
+ area_C + area_D
@@ -17,12 +17,12 @@ Which of the below alignments are correct?
17
17
result = my_function(area_A, area_B,
18
18
area_C, area_D)
19
19
20
- - [ ] d
20
+ - [x ] d
21
21
22
22
result = my_function(area_A, area_B,
23
23
area_C, area_D)
24
24
25
- - [ ] e
25
+ - [x ] e
26
26
27
27
result = my_function(
28
28
area_A, area_B,
@@ -58,7 +58,7 @@ Constants:
58
58
- [ ] d ` T = 0.1 `
59
59
60
60
Other:
61
- - [ ] a ` list = my_areas `
61
+ - [x ] a ` list = my_areas `
62
62
- [ ] b ` list_ = my_areas `
63
63
- [ ] c ` __list__ = my_areas `
64
64
- [ ] d ` _list = my_areas `
Original file line number Diff line number Diff line change 1
1
import numpy as np
2
2
3
- def area_circ (r_in ):
3
+
4
+ def area_circ (r_in ):
4
5
"""Calculate the area of a circle with given radius.
5
6
6
7
:Input: The radius of the circle (float, >=0).
7
8
:Returns: The area of the circle (float)."""
8
- if r_in < 0 :
9
+ if r_in < 0 :
9
10
raise ValueError ("The radius must be >= 0." )
10
- Kreis = np .pi * r_in ** 2
11
+ Kreis = np .pi * r_in ** 2
11
12
print (
12
13
"""The area of a circle with radius r = {:3.2f}cm is A = {:4.2f}cm2.""" .format (
13
- r_in ,Kreis
14
+ r_in , Kreis
14
15
)
15
16
)
16
17
return Kreis
17
18
19
+
18
20
if __name__ == "__main__" :
19
- _ = area_circ (5.0 )
21
+ _ = area_circ (5.0 )
You can’t perform that action at this time.
0 commit comments