-
Notifications
You must be signed in to change notification settings - Fork 0
/
w03-task.html
156 lines (153 loc) · 5.71 KB
/
w03-task.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSE 121b | W03: Programming Tasks</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;600&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="styles/main.css">
</head>
<body>
<nav>
<ul id="menu">
<li><a id="toggleMenu">≡</a></li>
<li><a href="index.html">Home</a></li>
<li><a href="w01-task.html">W1 Task</a></li>
<li><a href="w03-task.html" class="active">W3 Task</a></li>
<li><a href="w04-task.html">W4 Task</a></li>
<li><a href="w05-task.html">W5 Task</a></li>
<li><a href="project2.html">Project</a></li>
</ul>
</nav>>
<header>
<h1>W03: Programming Tasks</h1>
</header>
<main id="task3">
<section id="section1">
<h2>Functions</h2>
<article>
<h3>Addition</h3>
<div>
<label for="add1">Number 1:</label>
<input type="text" id="add1" name="add1">
</div>
<div>
<label for="add2">Number 2:</label>
<input type="text" id="add2" name="add2">
</div>
<div>
<input type="button" id="addNumbers" value="Add Numbers">
</div>
<div>
<label for="sum">Sum:</label>
<input type="text" id="sum" name="sum" disabled>
</div>
</article>
<article>
<h3>Subtraction</h3>
<div>
<label for="subtract1">Number 1:</label>
<input type="text" id="subtract1" name="subtract1">
</div>
<div>
<label for="subtract2">Number 2:</label>
<input type="text" id="subtract2" name="subtract2">
</div>
<div>
<input type="button" id="subtractNumbers" value="Subtract Numbers">
</div>
<div>
<label for="difference">Difference:</label>
<input type="text" id="difference" name="difference" disabled>
</div>
</article>
<article>
<h3>Multiplication</h3>
<div>
<label for="factor1">Number 1:</label>
<input type="text" id="factor1" name="factor1">
</div>
<div>
<label for="factor2">Number 2:</label>
<input type="text" id="factor2" name="factor2">
</div>
<div>
<input type="button" id="multiplyNumbers" value="Multiply Numbers">
</div>
<div>
<label for="product">Product:</label>
<input type="text" id="product" name="product" disabled>
</div>
</article>
<article>
<h3>Division</h3>
<div>
<label for="dividend">Dividend:</label>
<input type="text" id="dividend" name="dividend">
</div>
<div>
<label for="divisor">Divisor:</label>
<input type="text" id="divisor" name="divisor">
</div>
<div>
<input type="button" id="divideNumbers" value="Divide Numbers">
</div>
<div>
<label for="quotient">Quotient:</label>
<input type="text" id="quotient" name="quotient" disabled>
</div>
</article>
</section>
<div>
<section id="section2">
<h2>Selection Structures</h2>
<label class="right">Subtotal:
<input type="number" id="subtotal" size="5">
</label>
<label class="middle right">
Club Member?
<input type="checkbox" id="member">
</label>
<div class="right">
<input type="button" id="getTotal" value="Get Total Due">
</div>
<div class="right">Total:
<span class="larger" id="total">$ --.--</span>
</div>
</section>
<section id="section3">
<h2>Array Methods</h2>
<p>
Source Array: <span id="array"></span>
</p>
<p>
Odd Numbers: <span id="odds"></span>
</p>
<p>
Even Numbers: <span id="evens"></span>
</p>
<p>
Sum of Source Array: <span id="sumOfArray"></span>
</p>
<p>
Source Array Times Two: <span id="multiplied"></span>
</p>
<p>
Sum of Source Array Times Two: <span id="sumOfMultiplied"></span>
</p>
</section>
</div>
</main>
<footer>
©<span id="year"></span> | CSE 121b | Task 03
</footer>
<script src="scripts/main.js"></script>
<script>
document.getElementById("year").innerHTML = new Date().getFullYear();
</script>
<script src="scripts/w03-task.js"></script>
</body>
</html>