Walukagga Patrick commited on
Commit
67349d9
·
1 Parent(s): 1d3b676

Update instructions

Browse files
Files changed (3) hide show
  1. .gitignore +2 -0
  2. README.md +7 -5
  3. requirements.txt +1 -0
.gitignore CHANGED
@@ -1,3 +1,5 @@
1
  .idea/
2
  venv
3
  **__pycache__
 
 
 
1
  .idea/
2
  venv
3
  **__pycache__
4
+ .pytest_cache
5
+ .env
README.md CHANGED
@@ -7,6 +7,7 @@ This assessment consists of 2 parts:
7
  ## Getting started
8
  - Fork this repository to create your own copy. ([More info about forking a repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo))
9
  - Clone your repository to access it locally: `git clone https://github.com/<your-username>/internship-assessment.git`. (Replace `<your-username>` with your Github username.)
 
10
  - Create a python virtual environment: `python -m venv venv`
11
  - Activate the virtual environment:
12
  - Linux/Mac: `source venv/bin/activate`
@@ -26,19 +27,19 @@ Your goal is to implement the 2 functions `collatz` and `distinct_numbers` to ma
26
  You can keep running the `pytest` command to see which tests are still failing and fix your code accordingly.
27
 
28
  ## Part 2: Write a simple python translation script
29
- Write a simple python script in a file `translate.py` that translates text to-and-from English to 5 local Ugandan languages.
30
 
31
  Your script should do the following:
32
  - Ask the user to choose a source language (English, Luganda, Runyankole, Ateso, Lugbara or Acholi).
33
- - If the source language is English, ask the user to choose a target language, otherwise set English as the target language.
34
  - Ask the user for text to translate (should be in the source language chosen).
35
  - Translate the input text into the target language.
36
 
37
  A sample interaction is as follows:
38
  ```
39
- (your program): Please choose the source language:
40
  (the user): English
41
- (your program): Please choose the target language: (one of Luganda, Runyankole, Ateso, Lugbara or Acholi):
42
  (the user): Luganda
43
  (your program): Enter the text to translate:
44
  (the user): How are you?
@@ -47,4 +48,5 @@ A sample interaction is as follows:
47
 
48
  This will require you to make use of Sunbird's API. You can find a [tutorial](https://github.com/SunbirdAI/sunbird-ai-api/blob/main/tutorial.md) here.
49
 
50
- To use the API, you'll need an access token which will be sent in the email inviting you to this assessment.
 
 
7
  ## Getting started
8
  - Fork this repository to create your own copy. ([More info about forking a repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo))
9
  - Clone your repository to access it locally: `git clone https://github.com/<your-username>/internship-assessment.git`. (Replace `<your-username>` with your Github username.)
10
+ - Change directory into the `internship-assessment` folder after cloning thr repository.
11
  - Create a python virtual environment: `python -m venv venv`
12
  - Activate the virtual environment:
13
  - Linux/Mac: `source venv/bin/activate`
 
27
  You can keep running the `pytest` command to see which tests are still failing and fix your code accordingly.
28
 
29
  ## Part 2: Write a simple python translation script
30
+ Write a simple python script in a file `translate.py` that translates text to-and-from English to 5 local Ugandan languages and viseversa.
31
 
32
  Your script should do the following:
33
  - Ask the user to choose a source language (English, Luganda, Runyankole, Ateso, Lugbara or Acholi).
34
+ - Ask the user to choose a target language (English, Luganda, Runyankole, Ateso, Lugbara or Acholi). A target language can't be the same as the source language.
35
  - Ask the user for text to translate (should be in the source language chosen).
36
  - Translate the input text into the target language.
37
 
38
  A sample interaction is as follows:
39
  ```
40
+ (your program): Please choose the source language: (one of English, Luganda, Runyankole, Ateso, Lugbara or Acholi)
41
  (the user): English
42
+ (your program): Please choose the target language: (one of English, Luganda, Runyankole, Ateso, Lugbara or Acholi):
43
  (the user): Luganda
44
  (your program): Enter the text to translate:
45
  (the user): How are you?
 
48
 
49
  This will require you to make use of Sunbird's API. You can find a [tutorial](https://github.com/SunbirdAI/sunbird-ai-api/blob/main/tutorial.md) here.
50
 
51
+ To use the API, you'll need an **access token** which will be sent in the email inviting you to this assessment. Please use this **access token** for this assignment and
52
+ don't try to signup to create an account as indicated in the tutorial above.
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
  pytest
2
  requests
 
 
1
  pytest
2
  requests
3
+ python-dotenv