Category Archives: Labs

Lab 5

This app is called Mole Mash. Using App Inventor I created a version of Whac-A-Mole for mobile devices. The app is pretty simple with a winter landscape, a “reset” button which erases all points and misses, and two labels that count each time you either hit or miss the mole. The objective is to try to touch the mole as much as you can without missing.

 

lab4

 

lab4

Lab 4

Using App Inventor, I created a painting app for mobile devices. It is very simple, with four selection of colors, the ability to use the phones camera to upload a picture into the canvas, and two selections of dot sizes. There is also the ability to “wipe” the screen in order to erase any painting done.

 

lab4

lab4

Lab 3

Similar to lab 2, this lab includes a more detailed menu of math asking which operation to choose. The user chooses the operation and inputs the numbers. After displaying the answer the program shows the menu again with options 1-6 being math equations and 7 being to exit.

 

option = True
while option:
option = input(“””
Menu:
1: Addition of Numbers
2: Subtraction of Numbers
3: Multiplication of Numbers
4: Division of Numbers
5: Remainder of Numbers
6: Compare Numbers
7: Exit

Choose operation to perform: “””)
print option
if option == 1:
a = input(“Enter a: “)
b = input(“Enter b: “)
s = a + b
print “a + b = “, s
if option == 2:
a = input(“Enter a: “)
b = input(“Enter b: “)
s = a – b
print “a – b = “, s
if option == 3:
a = input(“Enter a: “)
b = input(“Enter b: “)
s = a * b
print “a * b = “, s
if option == 4:
a = input(“Enter a: “)
b = input(“Enter b: “)
s = a / b
print “a / b = “, s
if option == 5:
a = input(“Enter a: “)
b = input(“Enter b: “)
s = a % b
print “a % b = “, s
if option == 6:
a = input(“Enter a: “)
b = input(“Enter a: “)
s = a > b
print “a > b = “, s
if option == 7:
exit()

 

lab1pic

Lab 2

This lab demonstrates a short menu with input options and does basic mathematical operations with the number the user provides. It displays the result and shows the menu again giving the option input new numbers or exit.

option = 1
while option == 1:
option = input(“Menu: (1) Enter numbers (2) Exit”)
print (option)
if option == 1:
a = input(“Enter x: “)
b = input(“Enter y: “)
c = a + b
print “a + b = “, c
c = a – b
print “a – b = “, c
c = a * b
print “a * b = “, c
c = a / b
p0rint “a / b = “, c
c = a % b
print “a % b = “, c
c = a < b
print “a < b = “, c

 

lab1pic