-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary code and update slides
- Loading branch information
1 parent
5c6a304
commit a211556
Showing
10 changed files
with
90 additions
and
73 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
:= walrus operator | ||
|
||
github |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,3 @@ | ||
"""Lesson 1""" | ||
|
||
"""Ignore this code up until...""" | ||
import answers.lesson_1_anwers as answers | ||
|
||
all_correct = True | ||
|
||
|
||
def statement(question, answer): | ||
global all_correct | ||
if not answers.statement(question, answer): | ||
all_correct = False | ||
return | ||
|
||
|
||
class FruitPrices: | ||
def __init__(self): | ||
self.prices = {"apple": 1.55, "banana": 2.44} | ||
|
||
def get_price(self, fruit): | ||
return self._price(fruit) | ||
|
||
def _price(self, fruit): | ||
return self.prices[fruit] | ||
|
||
|
||
fruit_prices = FruitPrices() | ||
print(fruit_prices.get_price("pear")) | ||
|
||
|
||
"""... here""" | ||
|
||
"""START HERE!""" | ||
|
||
""" Question 1 | ||
What is a comment? Uncomment the correct answer below | ||
""" | ||
|
||
# statement("a comment is", "a fish") | ||
# statement("a comment is", "annoying") | ||
# statement("a comment is", "helpful") | ||
# statement("a comment is", "used to provide helpful information for your later self and others to better understand your code at a later date") | ||
# statement("a comment is", "a fish") | ||
|
||
""" Question 2 | ||
What is a variable? | ||
""" | ||
|
||
""" Question 3 | ||
What is a type? | ||
""" | ||
|
||
""" Question 4 | ||
What is flow control | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
|
||
# End print | ||
answers.end(all_correct) | ||
print("Hello world!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
"""Lesson 1""" | ||
|
||
"""Ignore this code up until...""" | ||
import answers.lesson_1_anwers as answers | ||
|
||
all_correct = True | ||
|
||
|
||
def statement(question, answer): | ||
global all_correct | ||
if not answers.statement(question, answer): | ||
all_correct = False | ||
return | ||
|
||
|
||
class FruitPrices: | ||
def __init__(self): | ||
self.prices = {"apple": 1.55, "banana": 2.44} | ||
|
||
def get_price(self, fruit): | ||
return self._price(fruit) | ||
|
||
def _price(self, fruit): | ||
return self.prices[fruit] | ||
|
||
|
||
fruit_prices = FruitPrices() | ||
print(fruit_prices.get_price("pear")) | ||
|
||
|
||
"""... here""" | ||
|
||
"""START HERE!""" | ||
|
||
""" Question 1 | ||
What is a comment? Uncomment the correct answer below | ||
""" | ||
|
||
# statement("a comment is", "a fish") | ||
# statement("a comment is", "annoying") | ||
# statement("a comment is", "helpful") | ||
# statement("a comment is", "used to provide helpful information for your later self and others to better understand your code at a later date") | ||
# statement("a comment is", "a fish") | ||
|
||
""" Question 2 | ||
What is a variable? | ||
""" | ||
|
||
""" Question 3 | ||
What is a type? | ||
""" | ||
|
||
""" Question 4 | ||
What is flow control | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
""" Question | ||
""" | ||
|
||
|
||
# End print | ||
answers.end(all_correct) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters