Advertisement
BetinaUKTC

Quiz

Apr 15th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.02 KB | None | 0 0
  1. int level;
  2. String fq = "What is the largest continent?";
  3. String sq = "Where is Bulgaria?";
  4. String tq = "What is the biggst country in the world?";
  5. String foq = "What is the longest river on earth?";
  6. String fiq = "How many oceans are in the world?";
  7. String siq = "What is the smallest counry in the world?";
  8. String seq = "What is the most spoken language?";
  9. String eq = "What is the capital of Bilgaria?";
  10. String nq = "How Many States Are There In The US";
  11. String teq = "What is the Biggest Ocean?";
  12. int score = 0;
  13.  
  14. void setup() {
  15. size(700, 600);
  16. }
  17.  
  18. void draw() {
  19. switch(level) {
  20. case 0:
  21. case 1:
  22. level1();
  23. break;
  24. case 2:
  25. level2();
  26. break;
  27. case 3:
  28. level3();
  29. break;
  30. case 4:
  31. level4();
  32. break;
  33. case 5:
  34. level5();
  35. break;
  36. case 6:
  37. level6();
  38. break;
  39. case 7:
  40. level7();
  41. break;
  42. case 8:
  43. level8();
  44. break;
  45. case 9:
  46. level9();
  47. break;
  48. case 10:
  49. level10();
  50. break;
  51. case 11:
  52. end();
  53. break;
  54. }
  55. }
  56.  
  57. void level1() {
  58. background(#22E3DE);
  59. fill(0);
  60. textSize(40);
  61. text(fq, 50, 50);
  62.  
  63. textSize(50);
  64. text("Asia", 120, 250);
  65. noFill();
  66. rect(50, 205, 260, 57);
  67. textSize(50);
  68. text("Europe", 430, 250);
  69. noFill();
  70. rect(395, 205, 230, 57);
  71. textSize(50);
  72. text("Africa", 100, 400);
  73. noFill();
  74. rect(50, 355, 260, 57);
  75. textSize(50);
  76. text("Australia", 400, 400);
  77. noFill();
  78. rect(395, 355, 230, 57);
  79. text(score, 650, 480);
  80. if (mouseX > 50 && mouseX <260 && mouseY >205 && mouseY<262 && mousePressed) {
  81. score=1;
  82. level=2;
  83. }
  84. }
  85.  
  86. void level2() {
  87. background(#22E3DE);
  88. textSize(40);
  89. text(sq, 50, 50);
  90. textSize(30);
  91. fill(0);
  92. text("In North America", 60, 250);
  93. noFill();
  94. rect(50, 205, 260, 57);
  95. textSize(30);
  96. text(" In Europe", 430, 250);
  97. noFill();
  98. rect(395, 205, 230, 57);
  99. textSize(30);
  100. text("In Africa", 100, 400);
  101. noFill();
  102. rect(50, 355, 260, 57);
  103. textSize(30);
  104. text("In Antarctica", 400, 400);
  105. noFill();
  106. rect(395, 355, 230, 57);
  107. text(score, 650, 480);
  108. if (mouseX >395 && mouseX <635 && mouseY >205 && mouseY<262 && mousePressed) {
  109. score=2;
  110. level=3;
  111. }
  112. }
  113.  
  114.  
  115.  
  116. void level3() {
  117. background(#22E3DE);
  118. background(#22E3DE);
  119. textSize(30);
  120. fill(0);
  121. text(tq, 50, 50);
  122. textSize(50);
  123. text("Poland", 120, 250);
  124. noFill();
  125. rect(50, 205, 260, 57);
  126. textSize(50);
  127. text("China", 430, 250);
  128. noFill();
  129. rect(395, 205, 230, 57);
  130. textSize(50);
  131. text("India", 100, 400);
  132. noFill();
  133. rect(50, 355, 260, 57);
  134. textSize(50);
  135. text("Russia", 400, 400);
  136. noFill();
  137. rect(395, 355, 230, 57);
  138. text(score, 650, 480);
  139. if (mouseX > 395 && mouseX <635 && mouseY >355 && mouseY<402 && mousePressed) {
  140. score=3;
  141. level=4;
  142. }
  143. }
  144.  
  145.  
  146. void level4() {
  147. background(#22E3DE);
  148. textSize(30);
  149. text(foq, 50, 50);
  150. fill(0);
  151. textSize(50);
  152. text("Danube", 110, 250);
  153. noFill();
  154. rect(50, 205, 260, 57);
  155. textSize(50);
  156. text("Amazon", 420, 250);
  157. noFill();
  158. rect(395, 205, 230, 57);
  159. textSize(50);
  160. text("Nile", 100, 400);
  161. noFill();
  162. rect(50, 355, 260, 57);
  163. textSize(50);
  164. text("Congo", 400, 400);
  165. noFill();
  166. rect(395, 355, 230, 57);
  167. text(score, 650, 480);
  168. if (mouseX > 50 && mouseX <410 && mouseY >355 && mouseY<402 && mousePressed) {
  169. score=4;
  170. level=5;
  171. }
  172. }
  173. void level5() {
  174. background(#22E3DE);
  175. textSize(35);
  176. text(fiq, 25, 50);
  177. textSize(40);
  178. fill(0);
  179. text("Eight", 60, 254);
  180. noFill();
  181. rect(50, 205, 260, 57);
  182. textSize(60);
  183. text(" Five", 430, 250);
  184. noFill();
  185. rect(395, 205, 230, 57);
  186. textSize(60);
  187. text("Seven", 100, 400);
  188. noFill();
  189. rect(50, 355, 260, 57);
  190. textSize(60);
  191. text("Four", 400, 400);
  192. noFill();
  193. rect(395, 355, 230, 57);
  194. text(score, 650, 480);
  195. if (mouseX >395 && mouseX <635 && mouseY >205 && mouseY<262 && mousePressed) {
  196. score=5;
  197. level=6;
  198. }
  199. }
  200.  
  201. void level6() {
  202. background(#22E3DE);
  203. fill(0);
  204. textSize(40);
  205. text(siq, 30, 50);
  206. fill(0);
  207. textSize(40);
  208. text("Vatican City", 120, 250);
  209. noFill();
  210. rect(50, 205, 260, 57);
  211. textSize(50);
  212. text("Serbia", 430, 250);
  213. noFill();
  214. rect(395, 205, 230, 57);
  215. textSize(50);
  216. text("Monaco", 100, 400);
  217. noFill();
  218. rect(50, 355, 260, 57);
  219. textSize(50);
  220. text("San Marino", 400, 400);
  221. noFill();
  222. rect(395, 355, 230, 57);
  223. text(score, 650, 480);
  224. if (mouseX > 50 && mouseX <260 && mouseY >205 && mouseY<262 && mousePressed) {
  225. score=6;
  226. level=7;
  227. }
  228. }
  229.  
  230. void level7() {
  231. background(#22E3DE);
  232. fill(0);
  233. textSize(40);
  234. text(seq, 50, 50);
  235. fill(0);
  236. textSize(50);
  237. text("Spanish", 120, 250);
  238. noFill();
  239. rect(50, 205, 260, 57);
  240. textSize(50);
  241. text("German", 430, 250);
  242. noFill();
  243. rect(395, 205, 230, 57);
  244. textSize(50);
  245. text("English", 100, 400);
  246. noFill();
  247. rect(50, 355, 260, 57);
  248. textSize(50);
  249. text("Mandarin", 400, 400);
  250. noFill();
  251. rect(395, 355, 230, 57);
  252. text(score, 650, 480);
  253. if (mouseX > 395 && mouseX <635 && mouseY >355 && mouseY<402 && mousePressed) {
  254. score=7;
  255. level=8;
  256. }
  257. }
  258. void level8() {
  259. background(#22E3DE);
  260. fill(0);
  261. textSize(35);
  262. text(eq, 25, 50);
  263. fill(0);
  264. textSize(60);
  265. text("Plovdiv", 60, 250);
  266. noFill();
  267. rect(50, 205, 260, 57);
  268. textSize(60);
  269. text("Sofia", 430, 250);
  270. noFill();
  271. rect(395, 205, 230, 57);
  272. textSize(60);
  273. text("Varna", 100, 400);
  274. noFill();
  275. rect(50, 355, 260, 57);
  276. textSize(60);
  277. text("Pravets", 400, 400);
  278. noFill();
  279. rect(395, 355, 230, 57);
  280. text(score, 650, 480);
  281. if (mouseX >395 && mouseX <635 && mouseY >205 && mouseY<262 && mousePressed) {
  282. score=8;
  283. level=9;
  284. }
  285. }
  286.  
  287. void level9() {
  288. background(#22E3DE);
  289. fill(0);
  290. textSize(40);
  291. text(nq, 50, 50);
  292. fill(0);
  293. textSize(50);
  294. text("55", 120, 250);
  295. noFill();
  296. rect(50, 205, 260, 57);
  297. textSize(50);
  298. text("46", 430, 250);
  299. noFill();
  300. rect(395, 205, 230, 57);
  301. textSize(50);
  302. text("50", 100, 400);
  303. noFill();
  304. rect(50, 355, 260, 57);
  305. textSize(50);
  306. text("39", 400, 400);
  307. noFill();
  308. rect(395, 355, 230, 57);
  309. text(score, 650, 480);
  310. if (mouseX > 50 && mouseX <410 && mouseY >355 && mouseY<402 && mousePressed) {
  311. score=9;
  312. level=10;
  313. }
  314. }
  315.  
  316. void level10() {
  317. background(#22E3DE);
  318. fill(0);
  319. textSize(30);
  320. text(teq, 50, 50);
  321. textSize(20);
  322. text("The Pacific Ocean", 100, 250);
  323. noFill();
  324. rect(50, 205, 260, 57);
  325. textSize(20);
  326. text("The Atlantic Ocean", 410, 250);
  327. noFill();
  328. rect(395, 205, 230, 57);
  329. textSize(20);
  330. text("The Indian Ocean", 90, 400);
  331. noFill();
  332. rect(50, 355, 260, 57);
  333. textSize(20);
  334. text("The Southern Ocean", 390, 400);
  335. noFill();
  336. rect(395, 355, 230, 57);
  337. text(score, 650, 480);
  338. if (mouseX > 50 && mouseX <260 && mouseY >205 && mouseY<262 && mousePressed) {
  339. score=10;
  340. level=11;
  341. }
  342. }
  343. void end() {
  344. background(#22E3DE);
  345. text("Congratulations!", 200, 250);
  346. textSize(40);
  347. fill(0);
  348. text("You reached the end of the quizz.", 25, 290);
  349. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement