GithubHelp home page GithubHelp logo

internship-assessment's Introduction

Sunbird AI Internship Assessment Exercise

This assessment consists of 2 parts:

  • Programming exercises.
  • Build a simple command line app using the Sunbird AI API.

Getting started

  • Fork this repository to create your own copy. (More info about forking a repository)
  • Clone your repository to access it locally: git clone https://github.com/<your-username>/internship-assessment.git. (Replace <your-username> with your Github username.)
  • Create a python virtual environment: python -m venv venv
  • Activate the virtual environment:
    • Linux/Mac: source venv/bin/activate
    • Windows: venv\Scripts\activate.bat
  • Install the required python packages: pip install -r requirements.txt
  • Run the command pytest. (The tests should be failing, it's your task to make them pass. See below for instructions)

Part 1: Programming exercises

There are 2 programming exercises designed to test your competency with the python programming language.

You can find the starter code and task descriptions in the exercises/basics.py file in this repo.

Run the following command: pytest. You will see that all the tests are failing.

Your goal is to implement the 2 functions collatz and distinct_numbers to make the above failing tests pass.

You can keep running the pytest command to see which tests are still failing and fix your code accordingly.

Part 2: Write a simple python translation script

Write a simple python script in a file translate.py that translates text to-and-from English to 5 local Ugandan languages.

Your script should do the following:

  • Ask the user to choose a source language (English, Luganda, Runyankole, Ateso, Lugbara or Acholi).
  • If the source language is English, ask the user to choose a target language, otherwise set English as the target language.
  • Ask the user for text to translate (should be in the source language chosen).
  • Translate the input text into the target language.

A sample interaction is as follows:

(your program): Please choose the source language:
(the user): English
(your program): Please choose the target language: (one of Luganda, Runyankole, Ateso, Lugbara or Acholi):
(the user): Luganda
(your program): Enter the text to translate:
(the user): How are you?
(your program): Oli otya?

This will require you to make use of Sunbird's API. You can find a tutorial here.

To use the API, you'll need an access token which will be sent in the email inviting you to this assessment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.