Fix Makefile for the 20_password project#2
Merged
kyclark merged 1 commit intokyclark:masterkyclark/tiny_python_projects:masterfrom Oct 20, 2020
mistermatze:fix-20_password-makefileCopy head branch name to clipboard
Merged
Fix Makefile for the 20_password project#2kyclark merged 1 commit intokyclark:masterkyclark/tiny_python_projects:masterfrom mistermatze:fix-20_password-makefileCopy head branch name to clipboard
kyclark merged 1 commit intokyclark:masterkyclark/tiny_python_projects:masterfrom
mistermatze:fix-20_password-makefileCopy head branch name to clipboard
Conversation
ZakiRucker
pushed a commit
to ZakiRucker/tiny_python_projects
that referenced
this pull request
Sep 12, 2021
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 whenmake testis 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.