File tree Expand file tree Collapse file tree 10 files changed +32
-20
lines changed
Expand file tree Collapse file tree 10 files changed +32
-20
lines changed Original file line number Diff line number Diff line change 2727 with :
2828 github_token : ${{ secrets.GITHUB_TOKEN }}
2929 black : true
30+ black_args : --line-length 79 # same max line length as flake8
3031 auto_fix : true # auto commit style fixes
Original file line number Diff line number Diff line change 1-
2- # Uses (Lint Action): https://github.com/marketplace/actions/lint-action#supported-tools
1+ # Uses (Lintly): https://github.com/grantmcconnaughey/Lintly
32# Submits code reviews based on flake8 output
43name : Python (Lintly)
54
@@ -19,12 +18,12 @@ jobs:
1918 with :
2019 python-version : ' 3.x'
2120
22- # Install flake8 and lintly
21+ # Install flake8 and Lintly
2322 - name : Install Python dependencies
2423 run : pip install flake8 lintly
2524
2625 # Run Lintly with flake8
2726 - name : Lint with flake8
28- run : flake8 | lintly --commit-sha=${{ github.event.pull_request.head.sha }} --format=flake8
27+ run : flake8 | lintly --commit-sha=${{ github.event.pull_request.head.sha }}
2928 env :
3029 LINTLY_API_KEY : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 99favorite_person = input ("Who is your favorite person? " )
1010
1111# Display output
12- print (favorite_person + " bought you " + favorite_food + " and " + favorite_drink + "." )
12+ print (
13+ favorite_person
14+ + " bought you "
15+ + favorite_food
16+ + " and "
17+ + favorite_drink
18+ + "."
19+ )
Original file line number Diff line number Diff line change 1111# or
1212was_computer_bought = True
1313was_bike_bought = False
14- print ("Was a computer or bike bought? " + str (was_computer_bought or was_bike_bought ))
14+ print (
15+ "Was a computer or bike bought? "
16+ + str (was_computer_bought or was_bike_bought )
17+ )
1518
1619# not
1720is_raining = False
Original file line number Diff line number Diff line change 1919
2020CENTS_PER_DOLLAR = 100
2121
22- num_cents = int (float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR )
22+ num_cents = int (
23+ float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR
24+ )
2325
2426# What do you do next? Write code here
Original file line number Diff line number Diff line change 2323CENTS_PER_NICKEL = 5
2424
2525# prompt user for dollars and convert it to cents
26- num_cents = int (float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR )
26+ num_cents = int (
27+ float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR
28+ )
2729
2830# calculate change and display it
2931dollars = num_cents // CENTS_PER_DOLLAR
Original file line number Diff line number Diff line change 11# Add All the Way
2- # Write a program that asks for and
3- # reads an input from the user
4- # Then add all the numbers up from 0
5- # to that number up. You can use a
6- # for or while loop. Print out the sum.
2+ # Take a number from the user and
3+ # add every number up from 1 to that number.
4+ # Print the result.
5+ # You can use a for or while loop.
76
87# write code here
Original file line number Diff line number Diff line change 22# Write a program that takes a number from the user
33# and adds 2 to it until it reaches 50 or more,
44# then prints out how many times 2 was added.
5- # If the number is already greater than 50 ,
5+ # If the number is already 50 or greater ,
66# then print out ('Already there!')
77
88# write code here
Original file line number Diff line number Diff line change 11# Add All the Way
2- # Write a program that asks for and
3- # reads an input from the user
4- # Then add all the numbers up from 0
5- # to that number up. You can use a
6- # for or while loop. Print out the sum.
2+ # Take a number from the user and
3+ # add every number up from 1 to that number.
4+ # Print the result.
5+ # You can use a for or while loop.
76
87# for loop solution
98sum = 0
Original file line number Diff line number Diff line change 22# Write a program that takes a number from the user
33# and adds 2 to it until it reaches 50 or more,
44# then prints out how many times 2 was added.
5- # If the number is already greater than 50 ,
5+ # If the number is already 50 or greater ,
66# then print out ('Already there!')
77
88# prompt user for a number
You can’t perform that action at this time.
0 commit comments