Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
christiaanwinchub committed Jun 13, 2023
1 parent 9797b53 commit 5b0fa49
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion wincpy/solutions/25596924dffe436da9034d43d0af6791/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ def farm_action(
return actions[:-1]


print(farm_action("rainy", "night", False, "pasture", "winter", False, False))
print(farm_action("sunny", "day", True, "pasture", "spring", False, True))
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import peewee

db = peewee.SqliteDatabase("database.db")
db = peewee.SqliteDatabase(":memory:")

class Ingredient(peewee.Model):
name = peewee.CharField()
Expand Down
12 changes: 3 additions & 9 deletions wincpy/solutions/c545bc87620d4ced81cbddb8a90b4a51/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@


def shortest_names(countries):
shortest_len = float("inf")
shortest = min(countries, key=len)
shortest_names = []

for country in countries:
country_len = len(country)
if country_len < shortest_len:
shortest_len = country_len
shortest_names = [country]
elif country_len == shortest_len:
if len(country) == len(shortest):
shortest_names.append(country)

return shortest_names
return(shortest_names)


def most_vowels(countries):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from .main import app
from main import app


@pytest.fixture
Expand Down

0 comments on commit 5b0fa49

Please sign in to comment.