File tree Expand file tree Collapse file tree 11 files changed +79
-7
lines changed
Expand file tree Collapse file tree 11 files changed +79
-7
lines changed Original file line number Diff line number Diff line change 1+ def start_counting ():
2+ for i in range (10 ):
3+ print (i )
4+ return i
5+
6+ start_counting ()
Original file line number Diff line number Diff line change 1+ def fizz_buzz ():
2+ # your code here
3+
4+
5+ fizz_buzz ()
Original file line number Diff line number Diff line change 1+ import random
2+
3+ def get_color (color_number = 4 ):
4+ # making sure is a number and not a string
5+ color_number = int (color_number )
6+
7+ switcher = {
8+ 0 :'red' ,
9+ 1 :'yellow' ,
10+ 2 :'blue' ,
11+ 3 :'green' ,
12+ 4 :'black'
13+ }
14+ return switcher .get (color_number ,"Invalid Color Number" )
15+
16+
17+ def get_allStudentColors ():
18+ example_color = get_color (1 )
19+ students_array = []
20+ #your loop here
21+
22+
23+ print (get_allStudentColors ())
Original file line number Diff line number Diff line change 1+ import random
2+
3+ bullet_position = 3
4+
5+ def spin_chamber ():
6+ chamber_position = random .randint (1 ,6 )
7+ return chamber_position
8+
9+ # DON'T CHANGE THE CODE ABOVE
10+ def fire_gun ():
11+ # YOUR CODE HERE
12+ return None
13+
14+
15+
16+
17+ print (fire_gun ())
Original file line number Diff line number Diff line change 1+ # Your code here!!
Original file line number Diff line number Diff line change 1+ # Your code here!
Original file line number Diff line number Diff line change 11def standards_maker ():
22 #your code here
3-
4- #remember to call the function outside (here)
3+
4+ for i in range (0 , 300 ):
5+ if i <= 300 :
6+ print ("I will write questions if I am stuck" )
7+ #remember to call the function outside (here)
8+ standards_maker ()
Original file line number Diff line number Diff line change 11def start_counting ():
2- for i in range (10 ):
2+ for i in range (12 ):
33 print (i )
44 return i
55
Original file line number Diff line number Diff line change 11def fizz_buzz ():
22 # your code here
3+ for i in range (1 ,101 ):
4+ if i % 15 == 0 :
5+ print ('FizzBuzz' )
6+ elif i % 5 == 0 :
7+ print ('Buzz' )
8+ elif i % 3 == 0 :
9+ print ('Fizz' )
10+ else :
11+ print (i )
12+
313
414
515fizz_buzz ()
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ def get_allStudentColors():
1818 example_color = get_color (1 )
1919 students_array = []
2020 #your loop here
21+ for i in range (1 ,11 ):
22+ example_color = get_color (random .randint (0 , 3 ))
23+ students_array .append (example_color )
24+
25+ return students_array
2126
2227
2328print (get_allStudentColors ())
You can’t perform that action at this time.
0 commit comments