Skip to content

Commit 8bda80c

Browse files
committed
Fix style for Simplify exercise
Variable names in Python should follow snake case conventions. Also, since the variables weren't initialized, we were getting errors, so I put the code in comments.
1 parent ea36d44 commit 8bda80c

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
"""Here is a block of code where one tries do determineif somone is a nobel prize winner.
1+
"""
2+
Here is a block of code where one tries do determine
3+
if somone is a nobel prize winner.
4+
5+
Rewrite the code to work in one statement.
26
3-
Rewrite the code to work in one statement
7+
(Remove the multi-line comments when
8+
you start working.)
49
"""
510

6-
if (doesSignificantWork):
7-
if (makesBreakthrough):
8-
nobelPrizeCandidate = True
11+
'''
12+
if does_significant_work:
13+
if makes_breakthrough:
14+
is_nobel_prize_candidate = True
915
else:
10-
nobelPrizeCandidate = False
11-
elif(not doesSignificantWork):
12-
nobelPrizeCandidate = False
16+
is_nobel_prize_candidate = False
17+
elif not does_significant_work:
18+
is_nobel_prize_candidate = False
19+
'''
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
''' Here is a block of code where one tries do determine if
2-
somone is a nobel prize winner. Rewrite the code to work in one statement'''
1+
"""
2+
Here is a block of code where one tries do determine
3+
if somone is a nobel prize winner.
34
4-
nobelPrizeCandidate = doesSignificantWork and makesBreakhrough
5+
Rewrite the code to work in one statement.
6+
7+
(Remove the multi-line comments when
8+
you start working.)
9+
"""
10+
11+
# is_nobel_prize_candidate = does_significant_work and makes_breakthrough

0 commit comments

Comments
 (0)