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 example.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 example.py
file, you should also provide a requirements.txt
file with the following content:
- A header, where you write
#CONDA
if you're using a Conda environment,#PIP
if you're using a virutal environment - The libraries that need to be installed to run the code
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
example.py
abides by the Pythonflake8
style requirements - That you successfully create and activate an environment
- That the script
example.py
runs successfully and print exactly only the content of the array
- Fork this repo 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