A simple workout app with AppInventor

Students will develop a simple workout app. The app should be able to do the following:

  • First, a simple random number is to be output. This should be between 1 and 20.
  • Then create a list of workout activities (e.g. jumps, push-ups, mini sprints, …).
  • At the push of a button, it should appear how often you do these activities (e.g. do 7 push-ups) 
  • On the screen should also appear a button with which you can exit the app

Worksheet: Step by step to the workout app

Dear children,https://lh5.googleusercontent.com/Q1VWOW-Z-PoyxRnReqnUz2t6-Q_9ESVCvKQYKsHd-Ml9TjfZKGMXUj8LVNWWvOLy2lwJ54Nc6crmIr_OiuPNbKfW-QGmoKkgPMUQ_tzQ8gCHylBtlLi7tZyyxRkDQHUdap99bHQd

the following worksheet will guide you through the development of your tournament app. 

To do this, first open the App Inventor. 

  • Now open a new project “Workout App

The app should be able to do the following:

  • First, a simple random number is to be output. This should be between 1 and 20.
  • Then creates a list of workout activities (e.g. stretch jumps, push-ups, mini sprints, …).
  • At the push of a button, it should appear how often you do these activities (e.g. do 7 push-ups) 
  • On the screen should also appear a button with which you can exit the app

Have fun!

In the first step you design the screen again. It could look like this if you only want to output a random number:

https://lh3.googleusercontent.com/21fLxse8y412bpo6VWKfdInrSqIw-oQnCp9tOl8Speyif65eo2B3FRA79awoXBo-TQnWOZMwjxpKybWR2dMRtpVjruP9ZjhlBx8POg7dz9BXERze7nkM5NRJyed5L4Slf-5mHSXW

For this, you need blocks to calculate the random number and to finish the app:

https://lh3.googleusercontent.com/7hCCYhz_8VFjB6gafZpFQUk_HIDLlDD0L9HGphJdo06EyhNp1sQgNTd6rbiQC6tIZPUvSxEM3U65qmCmWCGoSKqMSo8pF2DpSz0_IPFIgz4oQGI6P50bOtPQ5RY-6fgdIj86P8DY

The next step is to create a list that contains about 5 different activities. Use the list element, here you can add as many activities as you can think of. And this is how the complete code could look like.  

https://lh3.googleusercontent.com/iwNVbp2SmnEVO5P4xYBegJOjFX4w2oy_U1v8vRpcIMxkC3TxLLUA3uTzcM3OAhofQbXaUJPWlXHcDsQm59Sr4AWbPINuXTikvrA8FIIelFEYEY_7L7C0TN_G5pkeR928wXLwUr-4

The screen now looks like this…

https://lh4.googleusercontent.com/b40mW6M56g-IaFLxan1OndnqMuosFg2GY5JhpA7I_3qs5IX2B-WbmSTA7qFUYUMFyTnTDRsogOaEACs9PdEY1eTo6ZgJsHQcNLUP3PEDUfo1DQwAwpVDDGYIGkv1j2eQQ2iSI3Qi

And now, let’s go! Have fun with your workout!

Published by Jan Pawlowski

Professor in Business Information Systems at Ruhr West University of Applied Sciences

Leave a Reply

Discover more from Computational Thinking and Acting

Subscribe now to keep reading and get access to the full archive.

Continue reading