Skip to content
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

14699966, 14623366 #22

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
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
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .vs/SeminarsSept/v17/.suo
Binary file not shown.
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\assignment_1.py",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
Binary file added __pycache__/assignment_2b.cpython-39.pyc
Binary file not shown.
Binary file added __pycache__/assignment_2c.cpython-39.pyc
Binary file not shown.
9 changes: 7 additions & 2 deletions assignment_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def lower_case(string):
"""

### your code starts here

lower_string = string.lower()
### your code ends here

return lower_string
Expand All @@ -38,7 +38,12 @@ def upper_case(string):
"""

### your code starts here

upper_string = string.upper()
### your code ends here

return upper_string
<<<<<<< HEAD
=======

>>>>>>> a56d05f31452f3198148974f311a9e5fa6a17360

4 changes: 2 additions & 2 deletions assignment_2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
just give a correct one.
"""

var_1 = function_2c(...)
var_1 = function_2c(1000, 10, 10, -50)["add"]

var_2 = function_2b(...)
var_2 = function_2b('Seminars', 'Borrel')['C']

if var_1 == 950:
print("Good job!")
Expand Down
9 changes: 9 additions & 0 deletions assignment_2b.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
No cheating! Don't show or tell hem the code directly
"""
def function_2b(string_1, string_2):
"""
Arguments: string_1 - string of characters converted to lower case letters
string_2 - string of characters converted to upper case letters
Return - dictionary with three options:
combined string of originals string "C"
lower case of string_1 "L"
uppercase of string_2 "C"

"""

lower = string_1.lower()
upper = string_2.upper()
Expand Down
10 changes: 10 additions & 0 deletions assignment_2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
No cheating! Don't show or tell hem the code directly
"""
def function_2c(w, x, y, z):
"""
Arguments:
w - first argument for addition and subtraction addition = w + z subtraction = w - z
x - first argument for multiplication and division x*y and x/y
y - second argument for multiplication and division x*y and x/y cannot be 0
z - second argument for addition and subtraction addition = w + z subtraction = w - z
Return - dictionary - results of mathematical operations :multiply, divide, add, substract


"""

multiplication = x * y
division = x / y
Expand Down