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 React, { | |
| useState, | |
| useRef, | |
| forwardRef, | |
| useImperativeHandle | |
| } from 'react' | |
| function ThumbnailGenerator({ src, width, height }, ref) { | |
| /* | |
| The only required prop is the "src". |
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
| words = [ | |
| "anopheles", | |
| "uniclinal", | |
| "sarong", | |
| "turcoman", | |
| "corrugator", | |
| "self-murder", | |
| "anacardium", | |
| "knurly", | |
| "pock", |
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
| def fibEvens(n): | |
| fibs = [] | |
| fib_evens = [] | |
| a,b = 0,1 | |
| while b < n: | |
| a,b = b,a+b | |
| if b < n: | |
| fibs.append(b) | |
| for numbers in fibs: | |
| if numbers % 2 == 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
| def multiples3or5(numRange): | |
| mults3or5 = [] | |
| for naturals in range(0,numRange): | |
| if naturals in range(3,numRange,3) or naturals in range(5,numRange,5): | |
| mults3or5.append(naturals) | |
| return sum(mults3or5) |
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
| def divisor(): | |
| number = int(input("Pick a number: ")) | |
| divisors = [] | |
| for i in range(1,number + 1): | |
| if number % i == 0: | |
| divisors.append(i) | |
| return ("Divisors of " + str(number) + " = " + str(divisors)) |