Skip to content

Commit

Permalink
Remove unnecessary code and update slides
Browse files Browse the repository at this point in the history
  • Loading branch information
Cotswoldsmaker committed Mar 24, 2024
1 parent 5c6a304 commit a211556
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 73 deletions.
Binary file added images/codespace-dark-theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/codespace-description.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/codespace-light-theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions material-to-cover.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


:= walrus operator

github
74 changes: 1 addition & 73 deletions module-1/hands-on/lesson_1.py
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!")
75 changes: 75 additions & 0 deletions module-1/hands-on/lesson_2.py
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)
4 changes: 4 additions & 0 deletions module-1/slides/1-introduction.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ title-slide-attributes:
data-background-image: /images/python-scales.jpg
---

## WHY LEARN TO CODE!

WHY LEARN TO CODE!

## Introduction (15 minutes)

* Welcome and course overview
Expand Down
5 changes: 5 additions & 0 deletions module-1/slides/2-coding-environment.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ highlight-style: tango
* More advanced functionalities


## OK, why learn to code?

* TBC


## Variables

* A single variable is a space in the computer's memory.
Expand Down

0 comments on commit a211556

Please sign in to comment.