Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Makefile for the 20_password project #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2020
Merged

Fix Makefile for the 20_password project #2

merged 1 commit into from
Oct 20, 2020

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