Quiz 1. Event Handlers & Conditionals

1. Name and define three ways in which the Android platform is more open than iOS (iPhone). Which of these is key to why App Inventor was developed for Android?

Android is more open than iOS in the following ways:

  • Android is open source. Programmers can access the program source code and change it, making a new app. It is the Android OS itself which is open source, not (necessarily) Android apps.
  • Android is open for use by hardware vendors: Any company can make mobile devices for Android.
  • Android is an open distribution. It is easy to publish apps on the market and, unlike with Apple (iOS) you can also publish apps on the web and distribute them over email.

Android's open distribution is the key reason why App Inventor was developed with Android instead of iOS. It allows students to build samples and unrefined apps and share them with other students, their teacher, their family and friends, etc.

Show Answer

2. Sketch the blocks for an app that has the following qualities:

  • Has one button called Button1
  • The image on Button1 changes each time it is clicked
  • The order of the images displayed when clicked are Obama, then Romney, then Clinton, then obama, and so on.

You'll need the following blocks:

3. In the following blocks, circle and label the following:

  • The Event
  • The Event-Handler
  • The Function-Calls
  • The Parameter

All the blocks, together, are an "event handler".

Show Answer

4.

Define the term parameter in the context of an App Inventor app.

The parameters of a function provide the information the function needs to perform its job, e.g., how long should the phone vibrate, or how big a circle should be drawn.

Show Answer