Guest User

Untitled

a guest
Apr 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.58 KB | None | 0 0
  1. // Given an array of categories and an array of trivia questions,
  2. // return an object that summarizes the number of questions in each
  3. // category and the average difficulty of those questions like so:
  4. {
  5. "Entertainment": {
  6. "numberOfQuestions": ?,
  7. "averageDifficulty": ?
  8. },
  9. "General_Knowledge": {
  10. "numberOfQuestions": ?,
  11. "averageDifficulty": ?
  12. },
  13. "Geography": {
  14. "numberOfQuestions": ?,
  15. "averageDifficulty": ?
  16. },
  17. "History": {
  18. "numberOfQuestions": ?,
  19. "averageDifficulty": ?
  20. }
  21. };
  22.  
  23.  
  24.  
  25. const categories = [
  26. { "id": 22, "name": "Geography" },
  27. { "id": 9, "name": "General Knowledge" },
  28. { "id": 23, "name": "History" },
  29. { "id": 15, "name": "Entertainment" },
  30. { "id": 10, "name": "Sports" },
  31. { "id": 12, "name": "Vehicles" }
  32. ];
  33.  
  34. const triviaQuestions = [
  35. {
  36. "category":15,
  37. "type":"multiple",
  38. "difficulty":5,
  39. "title":"When was the first Call of Duty title released?",
  40. "correct_answer":"October 29, 2003",
  41. "incorrect_answers":["December 1, 2003","November 14, 2002","July 18, 2004"]
  42.  
  43. },
  44. {
  45. "category":15,
  46. "type":"multiple",
  47. "difficulty":3,
  48. "title":"How many books are in the Chronicles of Narnia series?",
  49. "correct_answer":"7",
  50. "incorrect_answers":["6","8","5"]
  51.  
  52. },
  53. {
  54. "category":15,
  55. "type":"boolean",
  56. "difficulty":1,
  57. "title":"Han Solo's co-pilot and best friend, "Chewbacca", is an Ewok.",
  58. "correct_answer":"False",
  59. "incorrect_answers":["True"]
  60. },
  61. {
  62. "category":9,
  63. "type":"multiple",
  64. "difficulty":3,
  65. "title":"The Tsar Bomba, the most powerful nuclear bomb ever tested, had a yield of 50 megatons but theoretically had a maximum yield of how much?",
  66. "correct_answer":"100 Megatons",
  67. "incorrect_answers":["200 Megatons","75 Megatons","150 Megatons"]
  68. },
  69. {
  70. "category":15,
  71. "type":"multiple",
  72. "difficulty":3,
  73. "title":"Which of these is NOT a terrorist faction in Counter-Strike (2000)?",
  74. "correct_answer":"Midwest Militia",
  75. "incorrect_answers":["Phoenix Connection","Elite Crew","Guerrilla Warfare"]
  76. },
  77. {
  78. "category":15,
  79. "type":"multiple",
  80. "difficulty":3,
  81. "title":"Which of these games was the earliest known first-person shooter with a known time of publication?",
  82. "correct_answer":"Spasim",
  83. "incorrect_answers":["Doom","Wolfenstein","Quake"]
  84. },
  85. {
  86. "category":15,
  87. "type":"multiple",
  88. "difficulty":5,
  89. "title":"What did Alfred Hitchcock use as blood in the film "Psycho"? ",
  90. "correct_answer":"Chocolate syrup",
  91. "incorrect_answers":["Ketchup","Red food coloring","Maple syrup"]
  92. },
  93. {
  94. "category":15,
  95. "type":"multiple",
  96. "difficulty":3,
  97. "title":"How many Star Spirits do you rescue in the Nintendo 64 video game "Paper Mario"?",
  98. "correct_answer":"7",
  99. "incorrect_answers":["5","10","12"]
  100. },
  101. {
  102. "category":15,"type":"multiple",
  103. "difficulty":3,
  104. "title":"Who played Batman in the 1997 film "Batman and Robin"?",
  105. "correct_answer":"George Clooney",
  106. "incorrect_answers":["Michael Keaton","Val Kilmer","Christian Bale"]
  107. },
  108. {
  109. "category":15,
  110. "type":"multiple",
  111. "difficulty":3,
  112. "title":"This movie contains the quote, "What we've got here is a failure to communicate."",
  113. "correct_answer":"Cool Hand Luke",
  114. "incorrect_answers":["Bonnie and Clyde","The Graduate","In the Heat of the Night"]
  115. },
  116. {
  117. "category":"Entertainment: Books",
  118. "type":"multiple",
  119. "difficulty":3,
  120. "title":"Who wrote the children's story "The Little Match Girl"?",
  121. "correct_answer":"Hans Christian Andersen",
  122. "incorrect_answers":["Charles Dickens","Lewis Carroll","Oscar Wilde"]
  123. },
  124. {
  125. "category":"Science & Nature",
  126. "type":"multiple",
  127. "difficulty":5,
  128. "title":"An organic compound is considered an alcohol if it has what functional group?",
  129. "correct_answer":"Hydroxyl",
  130. "incorrect_answers":["Carbonyl","Alkyl","Aldehyde"]
  131. },
  132. {
  133. "category":"Mythology",
  134. "type":"multiple",
  135. "difficulty":3,
  136. "title":"Neptune's greek name was...",
  137. "correct_answer":"Poseidon",
  138. "incorrect_answers":["Ares","Zeus","Apollo"]
  139. },
  140. {
  141. "category":9,"type":"multiple",
  142. "difficulty":3,
  143. "title":"What is a "dakimakura"?",
  144. "correct_answer":"A body pillow",
  145. "incorrect_answers":["A Chinese meal, essentially composed of fish","A yoga posture","A word used to describe two people who truly love each other"]
  146. },
  147. {
  148. "category":22,
  149. "type":"multiple",
  150. "difficulty":3,
  151. "title":"Which of these countries is NOT located in Africa?",
  152. "correct_answer":"Suriname",
  153. "incorrect_answers":["Burkina Faso","Mozambique","Algeria"]
  154. },
  155. {
  156. "category":15,
  157. "type":"multiple",
  158. "difficulty":3,
  159. "title":"What is the name of the comic about a young boy, and a tiger who is actually a stuffed animal?",
  160. "correct_answer":"Calvin and Hobbes",
  161. "incorrect_answers":["Winnie the Pooh","Albert and Pogo","Peanuts"]
  162. },
  163. {
  164. "category":23,
  165. "type":"boolean","difficulty":1,"title":"The United States was a member of the League of Nations.",
  166. "correct_answer":"False",
  167. "incorrect_answers":["True"]
  168. },
  169. {
  170. "category":15,
  171. "type":"multiple",
  172. "difficulty":3,
  173. "title":"In the 2002 video game "Kingdom Hearts", how many playable worlds were there?",
  174. "correct_answer":"14",
  175. "incorrect_answers":["13","16","11"]
  176. },
  177. {
  178. "category":9,"type":"multiple",
  179. "difficulty":5,
  180. "title":"What is the romanized Korean word for "heart"?",
  181. "correct_answer":"Simjang",
  182. "incorrect_answers":["Aejeong","Jeongsin","Segseu"]
  183. },
  184. {
  185. "category":10,
  186. "type":"multiple",
  187. "difficulty":5,
  188. "title":"Where was the Games of the XXII Olympiad held?",
  189. "correct_answer":"Moscow",
  190. "incorrect_answers":["Barcelona","Tokyo","Los Angeles"]
  191. },
  192. {
  193. "category":23,
  194. "type":"multiple",
  195. "difficulty":5,
  196. "title":"When was the SS or Schutzstaffel established?",
  197. "correct_answer":"April 4th, 1925",
  198. "incorrect_answers":["September 1st, 1941","March 8th, 1935","February 21st, 1926"]
  199. },
  200. {
  201. "category":9,"type":"boolean","difficulty":1,"title":"You can legally drink alcohol while driving in Mississippi.",
  202. "correct_answer":"True",
  203. "incorrect_answers":["False"]
  204. },
  205. {
  206. "category":15,
  207. "type":"multiple",
  208. "difficulty":3,
  209. "title":"Which of these is the name of a cut enemy from "Half-Life 2"?",
  210. "correct_answer":"Hydra",
  211. "incorrect_answers":["Cthulu","Spike","Tremor"]
  212. },
  213. {
  214. "category":15,"type":"multiple",
  215. "difficulty":3,
  216. "title":"Who played Baron Victor Frankestein in the 1957 Hammer horror film "The Curse of Frankenstein"?",
  217. "correct_answer":"Peter Cushing",
  218. "incorrect_answers":["Boris Karloff","Vincent Price","Lon Chaney Jr."]
  219. },
  220. {
  221. "category":12,
  222. "type":"multiple",
  223. "difficulty":3,
  224. "title":"Which car brand does NOT belong to General Motors?",
  225. "correct_answer":"Ford",
  226. "incorrect_answers":["Buick","Cadillac","Chevrolet"]
  227. },
  228. {
  229. "category":12,
  230. "type":"multiple",
  231. "difficulty":3,
  232. "title":"What do the 4 Rings in Audi's Logo represent?",
  233. "correct_answer":"Previously independent automobile manufacturers",
  234. "incorrect_answers":["States in which Audi makes the most sales","Main cities vital to Audi","Countries in which Audi makes the most sales"]
  235. },
  236. {
  237. "category":50,
  238. "type":"multiple",
  239. "difficulty":5,
  240. "title":"What is the Gray Wolf's scientific name?",
  241. "correct_answer":"Canis Lupus",
  242. "incorrect_answers":["Canis Aureus","Canis Latrans","Canis Lupus Lycaon"]
  243. },
  244. {
  245. "category":15,
  246. "type":"multiple",
  247. "difficulty":1,"title":"In vanilla Minecraft, which of the following cannot be made into a block?",
  248. "correct_answer":"Charcoal",
  249. "incorrect_answers":["Coal","Wheat","String"]
  250. },
  251. {
  252. "category":15,
  253. "type":"multiple",
  254. "difficulty":3,
  255. "title":"Which is not a playable character in the 2005 video game Killer7?",
  256. "correct_answer":"Frank Smith",
  257. "incorrect_answers":["Mask de Smith","Dan Smith","Coyote Smith"]
  258. },
  259. {
  260. "category":15,
  261. "type":"multiple",
  262. "difficulty":1,"title":"What country is Cory in the House set in?",
  263. "correct_answer":"The United States of America",
  264. "incorrect_answers":["Canada","Venezuala","England"]
  265. },
  266. {
  267. "category":23,
  268. "type":"multiple",
  269. "difficulty":1,"title":"What was the first sport to have been played on the moon?",
  270. "correct_answer":"Golf",
  271. "incorrect_answers":["Football","Tennis","Soccer"]
  272. },
  273. {
  274. "category":12,
  275. "type":"multiple",
  276. "difficulty":5,
  277. "title":"What engine is in the Lexus SC400?",
  278. "correct_answer":"1UZ-FE",
  279. "incorrect_answers":["2JZ-GTE","7M-GTE","5M-GE"]
  280. },
  281. {
  282. "category":15,
  283. "type":"multiple",
  284. "difficulty":5,
  285. "title":"Which year was the album "Floral Shoppe" by Macintosh Plus released?",
  286. "correct_answer":"2011",
  287. "incorrect_answers":["2014","2013","2012"]
  288. },
  289. {
  290. "category":15,
  291. "type":"multiple",
  292. "difficulty":5,
  293. "title":"Which country does the YouTuber "SinowBeats" originate from?",
  294. "correct_answer":"Scotland",
  295. "incorrect_answers":["England","Sweden","Germany"]
  296. },
  297. {
  298. "category":15,"type":"boolean","difficulty":5,
  299. "title":""Cube", "Cube 2: Hypercube" and "Cube Zero" were directed by the same person.",
  300. "correct_answer":"False",
  301. "incorrect_answers":["True"]
  302. },
  303. {
  304. "category":15,
  305. "type":"boolean","difficulty":3,
  306. "title":"EDM label Monstercat signs tracks instead of artists.",
  307. "correct_answer":"True",
  308. "incorrect_answers":["False"]
  309. },
  310. {
  311. "category":22,
  312. "type":"multiple",
  313. "difficulty":3,
  314. "title":"How tall is One World Trade Center in New York City?",
  315. "correct_answer":"1,776 ft",
  316. "incorrect_answers":["1,888 ft","1,225 ft","1,960 ft"]
  317. },
  318. {
  319. "category":22,
  320. "type":"multiple",
  321. "difficulty":5,
  322. "title":"What is the name of rocky region that spans most of eastern Canada?",
  323. "correct_answer":"Canadian Shield",
  324. "incorrect_answers":["Rocky Mountains","Appalachian Mountains","Himalayas"]
  325. },
  326. {
  327. "category":23,
  328. "type":"multiple",
  329. "difficulty":1,"title":"How was Socrates executed?",
  330. "correct_answer":"Poison",
  331. "incorrect_answers":["Decapitation","Firing squad","Crucifixion "]
  332. },
  333. {
  334. "category":10,
  335. "type":"multiple",
  336. "difficulty":1,"title":"What year did the New Orleans Saints win the Super Bowl?",
  337. "correct_answer":"2009",
  338. "incorrect_answers":["2008","2010","2011"]
  339. },
  340. {
  341. "category":9,"type":"multiple",
  342. "difficulty":3,
  343. "title":"When was Hubba Bubba first introduced?",
  344. "correct_answer":"1979",
  345. "incorrect_answers":["1984","1972","1980"]
  346. },
  347. {
  348. "category":22,
  349. "type":"multiple",
  350. "difficulty":1,"title":"What is the capital of Spain?",
  351. "correct_answer":"Madrid",
  352. "incorrect_answers":["Barcelona","Sevilla","Toledo"]
  353. },
  354. {
  355. "category":15,
  356. "type":"multiple",
  357. "difficulty":1,"title":"In the show "Steven Universe", who are the main two employees of The Big Donut?",
  358. "correct_answer":"Sadie and Lars",
  359. "incorrect_answers":["Steven and James","Erik and Julie","Bob and May"]
  360. },
  361. {
  362. "category":22,
  363. "type":"multiple",
  364. "difficulty":1,"title":"What is the capital of India?",
  365. "correct_answer":"New Delhi",
  366. "incorrect_answers":["Bejing","Montreal","Tithi"]
  367. },
  368. {
  369. "category":15,
  370. "type":"multiple",
  371. "difficulty":1,"title":"In season one of the Netflix political drama "House of Cards", what government position does Frank Underwood hold?",
  372. "correct_answer":"House Majority Whip",
  373. "incorrect_answers":["Attorney General","President","Chief of Staff"]
  374. },
  375. {
  376. "category":23,
  377. "type":"multiple",
  378. "difficulty":3,
  379. "title":"What was the name of one of the surviving palaces of Henry VIII located near Richmond, London?",
  380. "correct_answer":"Hampton Court",
  381. "incorrect_answers":["St James's Palace","Buckingham Palace","Coughton Court"]
  382. },
  383. {
  384. "category":15,
  385. "type":"multiple",
  386. "difficulty":5,
  387. "title":"Which one of these characters is from "Legendz : Tale of the Dragon Kings"?",
  388. "correct_answer":"Shiron",
  389. "incorrect_answers":["Jack","Axia","Drum"]
  390. },
  391. {
  392. "category":15,
  393. "type":"multiple",
  394. "difficulty":3,
  395. "title":"What was David Bowie's real surname?",
  396. "correct_answer":"Jones",
  397. "incorrect_answers":["Johnson","Edwards","Carter"]
  398. },
  399. {
  400. "category":15,
  401. "type":"multiple",
  402. "difficulty":3,
  403. "title":"In Pokémon Chronicles, why was Misty afraid of Gyarados?",
  404. "correct_answer":"She crawled into it's mouth as a baby.",
  405. "incorrect_answers":["She found it scary.","She was badly injured from it.","It is part Bug."]
  406. }
  407. ];
Add Comment
Please, Sign In to add comment