{"id":128531,"date":"2021-06-08T13:00:39","date_gmt":"2021-06-08T13:00:39","guid":{"rendered":"https:\/\/developer.apple.com\/news\/?id=wt1jaap6"},"modified":"2021-06-08T13:00:39","modified_gmt":"2021-06-08T13:00:39","slug":"challenge-design-a-quiz-in-swift-playgrounds","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2021\/06\/08\/challenge-design-a-quiz-in-swift-playgrounds\/","title":{"rendered":"Challenge: Design a quiz in Swift Playgrounds"},"content":{"rendered":"<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/10\/challenge-design-a-quiz-in-swift-playgrounds.jpg\" data-hires=\"false\" alt=\"Hammer symbol and paint brush symbol\"><\/div>\n<p>Do the people in your life know your favorite animal noise? How about the book that changed your life? Your least favorite pizza topping? Design a \u201cHow well do you know me?\u201d quiz to see who knows the most about your quirks and interests. <\/p>\n<h3>Begin the challenge<\/h3>\n<p>This challenge invites you to create a quiz using the Answers book in Swift Playgrounds. Your \u201cHow do you know me\u201d quiz should ask a series of questions and ultimately return a score (and possibly a colorful description!) based upon how many questions were answered correctly.<\/p>\n<p>To get started, download and open Swift Playgrounds on your iPad or Mac, then select See All from the lower right corner to launch the Swift Playgrounds content screen. From here, you can find the Answers book under \u201cStarting Points\u201d and download a copy to your device.<\/p>\n<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/10\/challenge-design-a-quiz-in-swift-playgrounds-1.jpg\" data-hires=\"false\" alt=\"Use the Swift Playgrounds app to download the Answers book for this challenge.\"><\/p>\n<div class=\"typography-caption\">\n<p>Use the Swift Playgrounds app to download the Answers book for this challenge.<\/p>\n<\/div>\n<\/div>\n<p>The Answers starting point contains a page called \u201cAPI Overview,\u201d which dives into the API for this playground. You can use the <code>show<\/code> call to display text or images, and use several different <code>ask<\/code> calls to request feedback from the player and store their response as variables. You can use the combination of these API calls to build up your own custom quiz questions and check responses against your own answer key. <\/p>\n<p>You can use Answers to build all sorts of different text-based trees and quizzes, and if you feel strongly about making a different type of quiz, please do! We highly encourage you to explore different ways of using this starting point to make something that you\u2019re excited about. And if you\u2019d like to share what you\u2019ve built with the community, post a video of your quiz in action or share a link in the Developer Forums.<\/p>\n<p><a href=\"https:\/\/developer.apple.com\/forums\/\" class=\"icon icon-after icon-chevronright\">Visit the Apple Developer Forums<\/a><\/p>\n<h3>Resources<\/h3>\n<p><a href=\"https:\/\/apps.apple.com\/us\/app\/swift-playgrounds\/id1496833156?mt=12\" class=\"icon icon-after icon-chevronright\">Download Swift Playgrounds for macOS<\/a><\/p>\n<p><a href=\"https:\/\/developer.apple.com\/swift-playgrounds\/\" class=\"icon icon-after icon-chevronright\">Learn more about Swift Playgrounds<\/a><\/p>\n<p><a href=\"https:\/\/developer.apple.com\/wwdc21\/challenges\/terms\/WWDC21_Challenge_Terms_Conditions.pdf\" class=\"icon icon-after icon-chevronright\">Read the WWDC21 Challenges Terms and Conditions<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do the people in your life know your favorite animal noise? How about the book that changed your life? Your least favorite pizza topping? Design a \u201cHow well do you know me?\u201d quiz to see who knows the most about your quirks and interests. Begin the challenge This challenge invites you to create a quiz [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":128532,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-128531","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apple-developer-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/128531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=128531"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/128531\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/128532"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=128531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=128531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=128531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}