- description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
class Student: | |
""" A Student class """ | |
def __init__(self, first, last, marks): | |
self.first = first | |
self.last = last | |
self.marks = marks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from employee import Student | |
from unittest.mock import patch | |
class TestStudent(unittest.TestCase): | |
def setUp(self): | |
print("Setup has been run") | |
self.stud_1 = Student('kelvin', 'onkundi', 300) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import africastalking | |
username = "africa username" # use 'sandbox' for development in the test environment | |
# use your sandbox app API key for development in the test environment | |
api_key = "africa's talking api key" | |
africastalking.initialize(username, api_key) | |
# # Use the service synchronously |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const add = (a, b) => { | |
return `sum is ${a + b}` | |
} | |
const substract = (a, b) =>{ | |
console.log(a-b) | |
return a - b | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {add, substract, multiplication, division,modulo} = require("../math") | |
test('should add two number and return sum', () => { | |
const sum = add(10, 10) | |
expect(sum).toEqual('sum is 20') | |
}); | |
test('should substract two number and return difference', () => { | |
const difference = substract(20, 10) | |
expect(difference).toEqual(10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {add, substract, multiplication, division,modulo} = require("../math") | |
test('should add two number and return sum', () => { | |
const sum = add(10, 10) | |
expect(sum).toEqual('sum is 20') | |
}); | |
test('should substract two number and return difference', () => { | |
const difference = substract(20, 10) | |
expect(difference).toEqual(10) |
Create an application that will allow users to search for books by entering a query (Title, Author, etc). Display the resulting books in a list on the page with all the corresponding data.
- User can enter a search query into an
input
field - User can submit the query. This will call an API that will return an array of books with the corresponding data (Title, Author, Published Date, Picture, etc)
- User can see the list of books appearing on the page
Before you start, please follow the issue title format and add yourself as Assignee If the event is a multiple date event only add the starting date in the title
Please complete all applicable.
- Event name: Script Winter of Code (SWoC)
- Event date: 2021/01/01 to 2021/02/28
- Estimated number of attendees: 1000
- Event location: Remote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Folder Structure | |
As we move towards making the project highly scalable, the folder structure is amongst the important things that we are going to be focusing on. | |
A good folder structure ensures that we have a good and consistent way of doing things and everybody on the team always knows where everything belongs. | |
We are going to maintain the following folder structure explained below. | |
|-- modules | |
|-- home | |
|-- [+] components | |
|-- [+] pages | |
|-- home-routing.module.ts | |
|-- home.module.ts |