Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ jobs:
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"python.testing.pytestArgs": [
"homework1"
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true
}
26 changes: 3 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
# Homework 1 - Week 3

![Python package](https://github.com/vcu-chfauerbach/root_homework1/workflows/Python%20package/badge.svg)
![Python package](https://github.com/vcu-DBaptisteMitchell/root_homework1/workflows/Python%20package/badge.svg)

![Pylint](https://github.com/vcu-chfauerbach/root_homework1/workflows/Pylint/badge.svg)
![Pylint](https://github.com/vcu-DBaptisteMitchell/root_homework1/workflows/Pylint/badge.svg)

![Super-Linter](https://github.com/vcu-chfauerbach/root_homework1/workflows/Super-Linter/badge.svg)

For your homework, fork this repository to your account.

Updated the 'README.md' file to change the URLs for the github actions:

https://github.com/vcu-chfauerbach/root_homework1/workflows/Pylint/badge.svg

should become

https://github.com/YOUR_GITHUB_ACCOUNT/root_homework1/workflows/Pylint/badge.svg

Edit the file ./homework1/hw1.py to make the three github actions pass.

When they pass, and you see the updated badges in your repository, send me a link to the repository, like:

https://github.com/vcu-chfauerbach/root_homework1

but

https://github.com/YOUR_GITHUB_ACCOUNT/root_homework1
![Super-Linter](https://github.com/vcu-DBaptisteMitchell/root_homework1/workflows/Super-Linter/badge.svg)
10 changes: 5 additions & 5 deletions homework1/hw1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
def return_number_3():
""" This function should return an integer with the value of 3"""

return_value = None
return_value = 3
return return_value


def return_string_vcu():
""" This function should return a string with the lowercase value of vcu"""

return_value = None
return_value = "vcu"
return return_value


def return_lowercased_string(input_string):
"""You have a variable called input_string that is of type string.
Return it but the lowercase version of it."""

return_value = input_string
return_value = input_string.lower()
return return_value


def return_without_starting_ending_whitespace(input_string):
"""You have a variable called input_string that is of type string.
Return it but with the surrounding (left and right) whitespace stripped."""

return_value = input_string
return_value = input_string.strip()
return return_value


def return_addition(first_number, second_number):
""" Return the two numbers added together. """

return_value = None
return_value = first_number + second_number
return return_value