Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
christiaanwinchub committed May 9, 2023
1 parent 1f065f9 commit df71fca
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
43 changes: 43 additions & 0 deletions wincpy/solutions/71dd124b4a6e4d268f5973db521394ee/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Do not modify these lines
__winc_id__ = "71dd124b4a6e4d268f5973db521394ee"
__human_name__ = "strings"

# Add your code after this line

# Part 1

# 1
scorer_0 = "Ruud Gullit"
scorer_1 = "Marco van Basten"

# 2
goal_0 = 32
goal_1 = 54

# 3
scorers = scorer_0 + " " + str(goal_0) + ", " + scorer_1 + " " + str(goal_1)

# 4
report = f"{scorer_0} scored in the {goal_0}nd minute\n{scorer_1} scored in the {goal_1}th minute"


# Part 2

# 1
player = "Hennadiy Lytovchenko"

# 2
first_name = player[: player.find(" ")]

# 3
last_name_len = len(player[player.find(" ") :]) - 1

# 4
name_short = f"{player[0]}.{player[player.find(' '):]}"

# 5
chant = f"{first_name}! " * len(first_name)
chant = chant[:-1]

# 6
good_chant = chant[-1] != " "
4 changes: 4 additions & 0 deletions wincpy/solutions/8fd255f5fe5e40dcb1995184eaa26116/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,7 @@ def logout():
# User was not logged in. That's fine.
pass
return redirect(url_for("index"))


if __name__ == "__main__":
app.run(debug=True)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def client():
def test_redirect(client):
response = client.get("/home")
assert response.status_code == 302
assert response.location == "http://localhost/"
assert response.location == "/"


def test_index(client):
Expand Down

0 comments on commit df71fca

Please sign in to comment.