In this assignment, you are required to create a very simple Python script that you'll need to submit, having a sequence of automatic tests (concerning mainly style and libraries) pass.
The code is a very simple implementation of a numpy array.
Write it in a file main.py
. In this script...
- You should create a list containing all the numbers from 1 to 10.
- A numpy array should be created from this list
- The numpy array should be printed, without adding any other text
- You should use a virtualenv/conda environment for this project
- You should install specifically numpy version 1.26.1
In addition to the main.py
file, you should also provide a requirements.txt
file in which you provide the list of libraries needed to run your code.
The file has to be filled in using the pip requirements standard.
The automatic tests are set up inside the folder .github/workflows
, which you should not touch or tamper with.
The tests will be checking:
- That the script
main.py
abides by the Pythonflake8
style requirements - That the script
main.py
runs successfully and print exactly only the content of the array - That you use the relevant version of Numpy, as indicated above
- Create your own version of the repository using the appropriate "Use this template" button in the upper-right part of the GitHub interface
- Clone the repo locally
- Implement your code
- Populate the
requirements.txt
file appropriately, as indicated above - Remember to keep track of the various operations by committing frequently
- Use meaningful commit messages
- Push everything