Apple has been granted a patent (number 10,108,335) for a “touch-based, interactive learning environment” using iPads and Swift Playgrounds, the company’s app designed to teach basic programming concepts like loops and conditionals using an animated character that the budding programmers direct by writing code.
In an example, a graphical user interface (GUI) is displayed to a user on a display device of an iPad. The GUI includes a first game portion visually depicting a first game element and second game elements disposed within a game environment.
![](/wp-content/uploads/archive/D73148CA-3DF9-42EA-A71F-21ADB9E47A75.jpg)
![](/wp-content/uploads/archive/D73148CA-3DF9-42EA-A71F-21ADB9E47A75.jpg)
A position of the first game element, a position of each of the second game elements, and/or a number of second game elements is randomized. The first GUI also includes a control portion visually depicting commands for manipulating the first game element within the game environment, and a first code portion.
The iPad receives an indication that the user selected one of the commands depicted in the control portion. In response, the game element is manipulated within the game environment in accordance with the selected command. A first sequence of software code associated with the selected command is displayed in the first code portion.
In the patent filing, Apple says that learning how to program a computer to perform tasks from a textbook can be challenging for many students. To learn how to code quickly, a student will often write code, compile the code, and execute the code on a computer to see if they get the expected results.
If the results are unexpected, the student will “debug” the code, compile the code, and execute the compiled code on the computer again. Apple says this learning process can be frustrating to students due to the delay between writing, compiling, and executing the code and seeing the results. The tech giant adds that most students would prefer to see the results in near real-time in an interactive learning environment.