Skip to content

Commit

Permalink
Altered non test files for concept exercise to test no important file…
Browse files Browse the repository at this point in the history
…s changed fix. DO NOT MERGEgit status
  • Loading branch information
BethanyG committed Jan 11, 2025
1 parent c8b3a39 commit efeb352
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
4 changes: 1 addition & 3 deletions exercises/concept/making-the-grade/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Also being familiar with the following can help with completing the tasks:
## 2. Non-Passing Students

- There's no need to declare `loop` counters or `index` counters when iterating through an object using a `for` loop.
- A results counter does need to be set up and _incremented_ -- you'll want to `return` the count of non-passing students when the loop terminates.


## 3. The "Best"

Expand All @@ -34,7 +34,6 @@ Also being familiar with the following can help with completing the tasks:

- These are _lower thresholds_. The _lower threshold_ for a "D" is a score of **41**, since an "F" is **<= 40**.
- [`range()`][range] can be helpful here to generate a sequence with the proper "F" -> "A" increments.
- [`round()`][round] without parameters should round off increments nicely.
- As with "the best" task, `<list>.append()` could be useful here to append items from `range()` into a results `list`.

## 5. Matching Names to Scores
Expand All @@ -45,7 +44,6 @@ Also being familiar with the following can help with completing the tasks:
## 6. A "Perfect" Score

- There may be or may not be a student with a score of 100, and you can't return `[]` without checking **all** scores.
- The [`control flow`][control flow] statements `continue` and `break` may be useful here to move past unwanted values.

[append and pop]: https://docs.python.org/3/tutorial/datastructures.html#more-on-lists
[control flow]: https://docs.python.org/3/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops
Expand Down
32 changes: 0 additions & 32 deletions exercises/concept/making-the-grade/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ The keywords `break`, `continue`, and `else` help customize loop behavior.

[`while`][while statement] loops will continue to execute as long as the `loop expression` or "test" evaluates to `True` in a [`boolean context`][truth value testing], terminating when it evaluates to `False`:

```python

# Lists are considered "truthy" in a boolean context if they
# contain one or more values, and "falsy" if they are empty.

>>> placeholders = ["spam", "ham", "eggs", "green_spam", "green_ham", "green_eggs"]

>>> while placeholders:
... print(placeholders.pop(0))
...
'spam'
'ham'
'eggs'
'green_spam'
'green_ham'
'green_eggs'
```


## For
Expand Down Expand Up @@ -135,21 +118,6 @@ If both values and their indexes are needed, the built-in [`enumerate(<iterable>

The [`continue`][continue statement] keyword can be used to skip forward to the next iteration cycle:

```python
word_list = ["bird", "chicken", "barrel", "bongo", "sliver", "apple", "bear"]

# This will skip *bird*, at index 0
for index, word in enumerate(word_list):
if index == 0:
continue
if word.startswith("b"):
print(f"{word.title()} (at index {index}) starts with a b.")

'Barrel (at index 2) starts with a b.'
'Bongo (at index 3) starts with a b.'
'Bear (at index 6) starts with a b.'
```


The [`break`][break statement] (_like in many C-related languages_) keyword can be used to stop the iteration and "break out" of the innermost enclosing `loop`:

Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/making-the-grade/.meta/exemplar.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def count_failed_students(student_scores):
non_passing = 0
for score in student_scores:
if score <= 40:
non_passing += 1
non_passing += 2
return non_passing


Expand Down

0 comments on commit efeb352

Please sign in to comment.