-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-tutorial.html
More file actions
123 lines (120 loc) · 4 KB
/
Copy pathadd-tutorial.html
File metadata and controls
123 lines (120 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html>
<head>
<title>Addition Tutorial | rowannerd</title>
<link rel='STYLESHEET' type='text/css' href='https://cascadecoder.github.io/rowannerd.css' />
<style>
body {
<!--background-color: rgb(0, 10, 200);-->
font-family: sans-serif;
color: rgb(0, 250, 0);
width: 600px;
}
.submit {
background-color: red;
color: white;
padding: 10px;
height: 50px;
}
button:hover {
background-color: black;
}
.quiz {
background-color: rgb(0, 255, 250);
color: black;
padding: 15px;
}
.middle {
text-align: center;
}
#1 {
visibility: visible;
top: 50px;
}
#2 {
visibility: hidden;
position: absolute;
top: 50px;
display: none;
}
.transition {
visibility: hidden;
background-color: rgb(0, 200, 10);
color: white;
height: 60px;
padding: 10px;
width: 80px;
}
.hidden {
visbility: hidden;
display: none;
}
</style>
</head>
<body>
<h1 class="middle">Addition Tutorial | <span id="rowannerd"> <a href="cascadecoder.github.io/homepage.html" style="color: rgb(0, 250, 0)">rowannerd</a></span></h1>
<div id="1">
<p>Addition is the most basic form of math (besides counting). This tutorial will teach you the basics of <b>Standard Algorithim</b>.</p>
<p>Standard Algorithim is when you put one number on top of another one: <br>15+4= can be re-written as <br> 15<br><u>+ 4</u><br><br>Where you put the answer is under the line.</p>
<p>The first thing you do is add the ones place (5 and 4) which is 9. Then, (if you need to carry the one add 1 to the tens place) add the tens place (1 and 0), which is 1. The result is 19!</p>
<p>Now it's time for you to test out your new skills in this practice problem:</p>
<br>
<div class="quiz">
<div id="1a">
<h3 class="middle">Practice #1</h3>
<p>Solve:</p>
<br>
<p>12<br><u>+9</u></p>
<input type="text" id="1t">
<button class="submit" onclick="submit(1, 21)">Submit</button>
</div>
<div id="1s"></div>
</div>
<button class="transition" id="1b" onclick="next(1)">Next >></button>
</div>
<div id="2" class="hidden">
<p>It's important to already know your single digit addition values, so here is a test on it:</p>
<br>
<div class="quiz">
<div id="2a">
<h3 class="middle">Practice #2</h3>
<p>Solve:</p>
<br>
<p>9+8=?</p>
<input type="text" id="2t">
<button class="submit" onclick="submit(2, 17)">Submit</button>
</div>
<div id="2s"></div>
</div>
<button class="transition" id="2ba" onclick="prev(2)"><< Previous</button>
<button class="transition" id="2b" onclick="next(2)">Next >></button>
</div>
<script>
var display;
//var current = 1;
var input;
function submit(id, answer) {
display = document.getElementById(id + "s");
input = Number(document.getElementById(id + "t").value);
if (input == answer) {
display.innerHTML = "Correct! It was " + answer + "!";
} else {
display.innerHTML = "Incorrect!";
}
document.getElementById(id + "a").style.visibility = 'hidden';
document.getElementById(id + "b").style.visibility = 'visible';
if (id > 1) {
document.getElementById(id + "ba").style.visibility = 'visible';
}
}
function next(current) {
document.getElementById(current).style.display = 'none';
document.getElementById(current + 1).style.display = 'block';
}
function prev(current) {
document.getElementById(current).style.display = 'none';
document.getElementById(current - 1).style.display = 'block';
}
</script>
</body>
</html>