Skip to content

Cairo 4.0 Assignment Task 4 #11

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

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

Conversation

ayomideadeniran
Copy link

📝 Cairo Assignment 1 - Implementation
📌 Objective
This PR implements solutions for Cairo Assignment 1, focusing on basic arithmetic operations and logical conditions using Cairo's primitive data types. Each function is modular, reusable, and well-commented as per the assignment guidelines.

✅ Tasks Implemented
Arithmetic Operations

Subtraction function

Multiplication function

Division function (with division by zero handling)

Even or Odd Sum

Function that computes the sum of two numbers and determines if it is even or odd

Odd Number Checker

Function that checks if a given number is odd

Basic Logic Functions

Number Sign Checker (determines if a number is positive, negative, or zero)

Maximum of Two Numbers (returns the larger of two numbers)

🛠 Implementation Details
Each function follows modular programming principles.

Meaningful variable names and snake_case are used for readability.

Type safety is ensured with correct argument and return types.

Edge cases, including division by zero, are handled appropriately.

Functions are tested within the main function, logging outputs to the terminal.

Here is Screenshot:
image

📌 How to Test
Run the main function to verify the correctness of all implemented functions. The expected outputs should match the described logic.

🚀 Ready for Review
Please review the implementation and suggest any improvements if needed. 🚀

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.

1 participant