Skip to content
CTS Blog
Menu
  • About
  • RSS Feed
Menu

Challenge: Design a quiz in Swift Playgrounds

Posted on June 8, 2021
Hammer symbol and paint brush symbol

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 “How well do you know me?” quiz to see who knows the most about your quirks and interests.

Begin the challenge

This challenge invites you to create a quiz using the Answers book in Swift Playgrounds. Your “How do you know me” 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.

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 “Starting Points” and download a copy to your device.

Use the Swift Playgrounds app to download the Answers book for this challenge.

Use the Swift Playgrounds app to download the Answers book for this challenge.

The Answers starting point contains a page called “API Overview,” which dives into the API for this playground. You can use the show call to display text or images, and use several different ask 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.

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’re excited about. And if you’d like to share what you’ve built with the community, post a video of your quiz in action or share a link in the Developer Forums using the tag “WWDC21-Challenges,” or on social media using the hashtag #WWDC21Challenges.

Explore WWDC21 Challenges on the Developer Forums

Explore #WWDC21Challenges on social media

Resources

Download Swift Playgrounds for macOS

Learn more about Swift Playgrounds

Read the WWDC21 Challenges Terms and Conditions

Powered by WPeMatico

Categories

Recent Posts

  • Amazon’s Fire TV Stick is only $20 right now! Grab one while you can
  • Inboxes are getting spammed with racist Ring sign-up emails
  • Adobe will charge you more for Creative Cloud in June, because AI (of course)
  • JBL’s take-on-the-go Bluetooth speaker is at its lowest ever price
  • This Gigabyte laptop is wild: 128GB RAM, 240Hz mini-LED, and RTX 5090 might

Recent Comments

    Archives

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    ©2025 CTS Blog | Design: Newspaperly WordPress Theme