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
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: |
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
//type number | |
let num:number; | |
//number aray | |
let myNumArray:number[] | |
myNumArray = [1, 3, 6] | |
//string array | |
let myStringArray:string[] = ["hello", 'hhh'] |