Skip to content

Commit 0734f38

Browse files
authored
Update solution.hide.py
1 parent 55cb751 commit 0734f38

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

exercises/16-Random-Colors-Loop/solution.hide.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import random
22

33
def get_color(color_number=4):
4-
# making sure is a number and not a string
4+
# Making sure is a number and not a string
55
color_number = int(color_number)
66

7-
switcher={
7+
switcher = {
88
0:'red',
99
1:'yellow',
1010
2:'blue',
1111
3:'green',
1212
4:'black'
1313
}
14+
1415
return switcher.get(color_number,"Invalid Color Number")
1516

1617
# ❌ ⬆ DON'T CHANGE THE CODE ABOVE ⬆ ❌
@@ -25,4 +26,4 @@ def get_allStudentColors():
2526
return students_array
2627

2728

28-
print(get_allStudentColors())
29+
print(get_allStudentColors())

0 commit comments

Comments
 (0)