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

Update q1.py #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update q1.py #7

wants to merge 1 commit into from

Conversation

acsoneye
Copy link

No description provided.

@alexng2338
Copy link

def swap(x, y):
"""
Task 1
- Create a function that would swap the value of x and y using only x and y as variables.
- x and y must be numeric.
- Return -1 if x and y is not numeric, and
- print the swapped values if both x and y are numeric.
"""
return

Task 2

Invoke the function "swap" using the following scenarios:

- "Apple", 10

- 9, 1

@acsoneye
Copy link
Author

acsoneye commented Nov 9, 2024 via email

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