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

[Uri] lab-functions #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

UriCVV
Copy link

@UriCVV UriCVV commented Oct 12, 2023

No description provided.

@sh-ih
Copy link

sh-ih commented Oct 13, 2023

Oriol,
Great job on this lab!

Some comments:
On question 5, you could simplify your code by calling the functions you created on the previous two questions:

def oper_all(arr, oper):
    if oper == "+":
        return sum_all(arr)
    elif oper == "*":
        return mult_all(arr)

And great idea to deal with the case of the oper not being either + or *

Keep using such clear names when naming your variables. It makes easier for someone else (and even future you!) to understand your code👍

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