This project includes Python scripts that solve basic algorithmic tasks:
- Prime factorization of a number
- Identifying the store with the highest total profit
- Finding all indices of a digit in a given string
-
211819958-Q1HW1.py:
Checks if a number is prime and computes its prime factorization based on user input. -
211819958-Q2HW1.py:
Determines which store has the highest total profit from a given list. -
211819958-Q3HW1.py:
Finds all indices of a specific digit in a user-provided string (e.g., ID number).
-
Prime Factorization
Run211819958-Q1HW1.pyand enter a number when prompted. The script will return its prime factorization. -
Best Store by Profit
Run211819958-Q2HW1.pyto see which store has the highest total profit. -
Find Digit Indices
Run211819958-Q3HW1.py, then input a string and a digit. The script will return the positions where the digit appears.
- Python 3.x
- No external libraries needed
Yair Dayan
Feel free to reach out for questions or feedback.