Created
April 19, 2018 20:52
-
-
Save teromakotero/3483970a75c8257614a2f757f8f5e969 to your computer and use it in GitHub Desktop.
Math exercises for first graders: number sequence.
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 random | |
| base = [] | |
| remedial = [] | |
| enrichment = [] | |
| while(len(remedial) < 10): | |
| new = ["0","1","2","3","4","5","6"] | |
| random_i = random.randint(0,6) | |
| random_j = random.randint(0,6) | |
| if(random_i != random_j): | |
| new[random_i] = "_" | |
| new[random_j] = "_" | |
| if(remedial.count(new) == 0): | |
| remedial.append(new) | |
| while(len(base) < 10): | |
| new = ["0","1","2","3","4","5","6"] | |
| random_i = random.randint(0,6) | |
| random_j = random.randint(0,6) | |
| random_k = random.randint(0,6) | |
| if(random_i != random_j and random_i != random_k and random_j != random_k): | |
| new[random_i] = "_" | |
| new[random_j] = "_" | |
| new[random_k] = "_" | |
| if(base.count(new) == 0): | |
| base.append(new) | |
| while(len(enrichment) < 10): | |
| new = ["6","5","4","3","2","1","0"] | |
| random_i = random.randint(0,6) | |
| random_j = random.randint(0,6) | |
| random_k = random.randint(0,6) | |
| if(random_i != random_j and random_i != random_k and random_j != random_k): | |
| new[random_i] = "_" | |
| new[random_j] = "_" | |
| new[random_k] = "_" | |
| if(enrichment.count(new) == 0): | |
| enrichment.append(new) | |
| print("") | |
| print("Base: ") | |
| print("") | |
| for i in base: | |
| for j in i: | |
| print(j), | |
| print("") | |
| print("") | |
| print("Remedial: ") | |
| print("") | |
| for i in remedial: | |
| for j in i: | |
| print(j), | |
| print("") | |
| print("") | |
| print("Enrichment: ") | |
| print("") | |
| for i in enrichment: | |
| for j in i: | |
| print(j), | |
| print("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment