This repo contains the accessment exercise for the Python Track Please perform the following instructions.
- Fork this repository.
- Clone the repository to your local computer.
- Add your solution to the specificied position.
- Commit your solution.
- Push your update to your repository.
- Submit your repository URL on the provided google form.
The directory structure of this template
python-ta/
.
├── readme.md
├── src
│ ├── __init__.py
│ └── app.py
└── test.py
# src/app.py
def solution(n):
# your code goes here
#if __name__ == "__main__":
if n <= 1:
print("not a prime number")
for i in range(2,n):
if (n%i==0):
print("not a prime number")
sys.exit(os.error("number > 1 required"))
print(is a prime number)
n=int(input(enter a number))
n = int(n[1])
print(solution(n))
Write your solution in the way your pass the argument into the program via the commandLine/Terminal.
# invoke the solution
$: python src/app.py <input>
The test containers some basic test to make sure your solution are correct. Run the test to verify.
$: python -m unittest test
contact: ***