-
Notifications
You must be signed in to change notification settings - Fork 0
/
scriptExtremeLevel4.js
307 lines (214 loc) · 14.6 KB
/
scriptExtremeLevel4.js
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
// Extreme DAY 4 (LEVEL 4) CUSTOMER 1 (QUESTION 1) START
function extremeLevel4Q1(){
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 36.70;
if(input == correct){
document.getElementById("display").innerHTML=` <b> Roberta:</b> Thank you Math Wiz 🔢!!! <br><button onclick="extremeLevel4Q2()"> Customer 2 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q2()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 1 (QUESTION 1) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 2 (QUESTION 2) START
function extremeLevel4Q2(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 2 (Question 2)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 37 pennies, 31 nickels, 38 dimes, 29 quarters, and 40 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 32.97;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q3()"> Customer 3 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q3()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 2 (QUESTION 2) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 3 (QUESTION 3) START
function extremeLevel4Q3(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 3 (Question 3)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 20 pennies, 39 nickels, 16 dimes, 18 quarters, and 45 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 30.75;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q4()"> Customer 4 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q4()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 3 (QUESTION 3) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 4 (QUESTION 4) START
function extremeLevel4Q4(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 4 (Question 4)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 28 pennies, 33 nickels, 15 dimes, 38 quarters, and 29 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 27.43;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q5()"> Customer 5 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q5()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 4 (QUESTION 4) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 5 (QUESTION 5) START
function extremeLevel4Q5(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 5 (Question 5)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 35 pennies, 17 nickels, 31 dimes, 21 quarters, and 48 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 33.55;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q6()"> Customer 6 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q6()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 5 (QUESTION 5) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 6 (QUESTION 6) START
function extremeLevel4Q6(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 6 (Question 6)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 52 pennies, 34 nickels, 39 dimes, 26 quarters, and 29 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 27.12;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q7()"> Customer 7 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q7()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 6 (QUESTION 6) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 7 (QUESTION 7) START
function extremeLevel4Q7(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 7 (Question 7)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 36 pennies, 18 nickels, 31 dimes, 34 quarters, and 16 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 23.11;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q8()"> Customer 8 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q8()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 7 (QUESTION 7) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 8 (QUESTION 8) START
function extremeLevel4Q8(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 8 (Question 8)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 17 pennies, 53 nickels, 38 dimes, 27 quarters, and 28 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 27.37;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q9()"> Customer 9 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q9()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 8 (QUESTION 8) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 9 (QUESTION 9) START
function extremeLevel4Q9(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 9 (Question 8)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 36 pennies, 50 nickels, 21 dimes, 36 quarters, and 48 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 37.96;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4Q10()"> Customer 10 </button>`
document.getElementById("submitButton").innerHTML = `<button onclick="extremeLevel4Q10()"> Submit</button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 9 (QUESTION 9) END
// Extreme DAY 4 (LEVEL 4) CUSTOMER 10 (QUESTION 10) START
function extremeLevel4Q10(){
// Names
const name = ["Stanley", "Trevor", "Eva", "Poppy","Darren","Jake","Selena","Ariana","Leonard","Troy","Makenzie","Logan","Emma","Abigail","Keana","Isabella","Skyla","Zachary","Jude","Hailey","Emily","Kayla","Jessica","Carol","Alex","Noah","Sadie","Michael","Julia","Sarah","Ashley","Madison","Howard","Sheryl","Adriyel"]
const randomName = name[Math.floor(Math.random() * name.length)];
//Compliments
const compliments = ["Wow You're a SUPERSTAR ⭐!!!!", "Your Awesome ❤️!!!!","Thank you Math Wiz 🔢!!!","Thank you ❤️!!!!", " I appreaciate this❤️!!!!❤️"];
const randomcompliment = compliments[Math.floor(Math.random() * compliments.length)];
document.getElementById("questionTitle").innerHTML= `Customer 10 (Question 10)`
document.getElementById("question").innerHTML= `<b> ${randomName} </b> I have 37 pennies, 31 nickels, 55 dimes, 33 quarters, and 15 fifty-cents... . How much money do I have? `
var input = document.getElementById("answerInput").value;
console.log(input)
var correct = 34.97 ;
if(input == correct){
document.getElementById("display").innerHTML=` <b> ${randomName}:</b> ${randomcompliment} <br><button onclick="extremeLevel4End()"> Finish Day 4 </button>`
}
else {
document.getElementById("display").innerHTML=`Try Again`
}
}
// Extreme DAY 4 (LEVEL 4) CUSTOMER 10 (QUESTION 10) END
function extremeLevel4End(){
document.getElementById("display").innerHTML=` <b> Boss :</b> Congratulations on Completing Day 4 <br> <a href="extremeLevelppppp.html"><button> Move on to Extreme Day 5 </button> </a>`
}