forked from stretchyboy/active_learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binary_addition.html
111 lines (93 loc) · 4.96 KB
/
binary_addition.html
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
<html>
<head>
<script src="external/jquery-1.11.0.min.js"></script>
<script src="external/handlebars-v1.3.0.js"></script>
<!--
<script src="TinCanJS/build/tincan-min.js"></script>
<script src="js/tincan_config.js"></script>
<script src="js/active_learn.js"></script>
-->
<script src="js/binary-addition.js"></script>
<link href="css/main.css" rel="stylesheet" type="text/css" media="all">
<link href="css/binary-addition.css" rel="stylesheet" type="text/css" media="all">
<!-- http://cssnewbie.com/example/css-only-accordion/vertical.html -->
</head>
<body>
<header>
<h1>Binary Addition Quiz</h1>
<!--
<div id="email">
<label for="tincanemail">School Email Address</label> <input type="email" id="tincanemail" />
<button id="save">Save</button>
</div>-->
</header>
<div class="explaination">
<h2>Explaination</h2>
<p>The grey boxes respond to mouse clicks, Clicking once will set it to "1", clicking again set it to "0". (You can just fill in the "1"s and use the "Blanks to 0's" button)</p>
<p>The questions will get harder as you go. When you have praciticed enough online please click the "Finish Exercise" button, and print out the work sheet to do on paper. And hand that in asap.</p>
<p>Remember to work from the right, adding one column at a time (and marking the carry row of the next column to the left if you need to)</p>
</div>
<div class="quizholder">
<h2>Question <span id="questionnumber" >1</span></h2>
<table class="sumbinary" id="questionholder" >
<tr class="sumline1 sumcolumns" ><th> </th><td> </td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><th> </th></tr>
<tr class="sumline2" ><th>+</th><td> </td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><th> </th></tr>
<tr class="sumresult binaryinput"><th>=</th><td> </td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><th><button class="sumzerofill">Blanks to 0's</button></th></tr>
<tr class="sumcarry binarycarryinput" ><th>Carry</th><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td class="invalid"> </td><th> </th></tr>
</table>
<label for="sumexplain">Explain any overflow</label> <input type="text" class="sumexplain" length="100" size="40"/><br />
<button class="sumcheck">Check Answer</button>
<button class="sumzerofill" id="sumzerofill2">Blanks to 0's</button>
<button class="sumnextquestion">Next Question</button>
<button class="sumhint">Get a Hint</button>
<button class="sumskip">Skip Question</button>
<button class="sumend">Finish Exercise</button>
<div class="sumfeedback"> </div>
<table>
<tr>
<th>Current Score</th><td class="sumscore"> </td>
<th>Exam Marks</th><td class="summarks"> </td>
</tr>
</table>
</div>
<div id="dump">
</div>
<script id="entry-template" type="text/x-handlebars-template">
<html>
<head>
<link href="css/binary-addition.css" rel="stylesheet" type="text/css" media="all">
<style>
.printsumline1>td{
width:2em;
}
.printsumresult>td, .printsumcarry>td{
border-top-width: 2px;
border-top-style: solid;
border-top-color: black;
}
</style>
</head>
<body>
<h1>Binary Addition - Paper Quiz</h1>
<p>Please print this sheet out and complete these questions by hand.</p>
<p><strong>Name:</strong> ________________________________ </p>
{{#aQuestions}}
<div class="quizholder">
<h2>Question {{iQuestion}}</h2>
<table class="sumbinary" id="questionholder" >
<tr class="printsumline1 " ><th> </th><td> </td>{{#each aLine1}}<td>{{this}}</td>{{/each}}</tr>
<tr class="printsumline2" ><th>+</th><td> </td>{{#each aLine2}}<td>{{this}}</td>{{/each}}</tr>
<tr class="printsumresult"><th>=</th><td colspan="9"> </td></tr>
<tr class="printsumcarry" ><th>Carry</th><td colspan="9"> </td></tr>
</table>
</div>
{{/aQuestions}}
<h2>Online Results</h2>
<p> Score = {{iCurrentScore}}<br />
Marks = {{iCurrentMark}} / {{iMaxMark}}
</p>
</body>
</html>
</script>
</body>
</html>