Skip to content

Instantly share code, notes, and snippets.

View deborahtrez's full-sized avatar
🏠
Working from home

Aanyu Deborah Oduman deborahtrez

🏠
Working from home
View GitHub Profile
@deborahtrez
deborahtrez / prime_numbers.py
Created July 29, 2021 15:22
How to check if a number is a prime number.
check_prime = [26, 39, 51, 53, 57, 79, 85]
# iterate through the check_prime list
for num in check_prime:
# search for factors, iterating through numbers ranging from 2 to the number itself
for i in range(2, num):
# number is not prime if modulo is 0
if (num % i) == 0:
@deborahtrez
deborahtrez / index.ts
Created April 12, 2021 15:14
Tungatech lesson #1 - ES6 restrict variable names to datatypes
//type number
let num:number;
//number aray
let myNumArray:number[]
myNumArray = [1, 3, 6]
//string array
let myStringArray:string[] = ["hello", 'hhh']