Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix Makefile for the 20_password project#2

Merged
kyclark merged 1 commit intokyclark:masterkyclark/tiny_python_projects:masterfrom
mistermatze:fix-20_password-makefileCopy head branch name to clipboard
Oct 20, 2020
Merged

Fix Makefile for the 20_password project#2
kyclark merged 1 commit intokyclark:masterkyclark/tiny_python_projects:masterfrom
mistermatze:fix-20_password-makefileCopy head branch name to clipboard

Conversation

@mistermatze
Copy link
Contributor

The [[ ! -f $(WORDS) ]] && ... check short circuit evaluates to false if the file exists and exits with 1. This causes the Makefile to throw an error when make test is run for the second time, because the file is already unzipped at that time. The fixed [[ -f $(WORDS) ]] || ... check short circuit evaluates to true if the file exists and exits with 0.

@kyclark kyclark merged commit f9151ba into kyclark:master Oct 20, 2020
ZakiRucker pushed a commit to ZakiRucker/tiny_python_projects that referenced this pull request Sep 12, 2021
@mistermatze mistermatze deleted the fix-20_password-makefile branch September 23, 2021 07:56
NowHappy pushed a commit to NowHappy/tiny_python_projects that referenced this pull request Oct 1, 2021
Yarpirates20 added a commit to Yarpirates20/tiny_python_projects that referenced this pull request Dec 23, 2022
Fixes kyclark#1
Use map function when assigning low, high in read_csv to split the string at the '-' character, and convert the strings to integers using int() function, the first map argument.

Fixes kyclark#2
Initiate empty list as wod. Use a foor loop of random.sample(exercises, ...)  which creates a list of tuples. Assign 3 variables for each iteration of the loop: exercise, low, and high.

Pick a random number between low and high, and append the tuple to wod. If the easy flag is given as argument, divide reps by two. Use the int() function to convert the result to an integer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.