Skip to content

Instantly share code, notes, and snippets.

@teromakotero
teromakotero / draw_a_clock.py
Last active August 31, 2018 21:51
This program draws a clock in svg file (inkscape_007.svg), that you can open in Inkscape. It asks the hours (1-12) and minutes (0, 5, 10...55) and draws the clock.
import svgwrite
import math
import sys
hours = input("Give the hours: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 or 12: ")
hours = int(hours)
print(hours)
minutes = input("Give the minutes: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45 or 55: ")
minutes = int(minutes)
@teromakotero
teromakotero / M1A_21.py
Created April 20, 2018 21:20
Math exercises for first graders: decomposition..
# coding: utf-8
import random
from random import shuffle
kaalit = {
1:"M1A_07_002.png",
2:"M1A_07_001.png",
3:"M1A_02_007.png",
4:"M1A_02_008.png",
5:"M1A_02_009.png"
@teromakotero
teromakotero / M1A_20.py
Created April 19, 2018 20:52
Math exercises for first graders: number sequence.
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)
@teromakotero
teromakotero / M1A_19.py
Created April 18, 2018 20:59
Math exercises for first graders: addition exercises, change of order.
import random
base = []
remedial = []
enrichment = []
kaalit = {
1:"M1A_07_002.png",
2:"M1A_07_001.png",
3:"M1A_02_007.png",
@teromakotero
teromakotero / M1A_18.py
Created April 17, 2018 20:31
Math exercises for first graders: addition exercises.
# coding:utf-8
import random
base = []
remedial = []
enrichment = []
kaalit = {
1:"M1A_07_002.png",
2:"M1A_07_001.png",
@teromakotero
teromakotero / M1A_17.py
Created April 16, 2018 18:57
Math exercises for first graders: starting addition.
# coding:utf-8
import random
base = []
remedial = []
enrichment = []
kaalit = {
1:"M1A_07_002.png",
2:"M1A_07_001.png",
@teromakotero
teromakotero / M3A_35.py
Created April 15, 2018 17:30
Math exercises for third graders: divider 2-9.
import random
base = []
base_jakaja = []
remedial = []
remedial_jakaja = []
enrichment = []
enrichment_jakaja = []
numerot_palikkoina = {
@teromakotero
teromakotero / M3A_34.py
Created April 15, 2018 06:34
Math exercises for third graders: divider 6-9.
import random
base = []
base_jakaja = []
remedial = []
remedial_jakaja = []
enrichment = []
enrichment_jakaja = []
numerot_palikkoina = {
@teromakotero
teromakotero / M3A_33.py
Created April 14, 2018 06:42
Math exercises for third graders: more division variations.
import random
base = []
remedial = []
enrichment = []
numerot_palikkoina = {
1:"M3A_02_001.png",
2:"M3A_02_002.png",
3:"M3A_02_003.png",
@teromakotero
teromakotero / M3A_32.py
Created April 13, 2018 06:36
Math exercises for third graders: division variations.
import random
base = []
remedial = []
enrichment = []
numerot_palikkoina = {
1:"M3A_02_001.png",
2:"M3A_02_002.png",
3:"M3A_02_003.png",