EMT 1111

Lab report example:
Lab 0: This is an example of the first lab and this code is just to show when two variables are added:


print(‘hello there, how are you?, please enter the two variables you wish to add’)
a=input(‘first variable: ‘)
b=input(‘second variable: ‘)
result=(a+(b))


Lab #1 (exercise 2 & 3 of the book “think python”:
Exercise 2 was interesting because it showed me the different between a script mode and interactive mode of the code


x
x+5
x+1


exercise 3: This exercise shows the different values and types found in python these values and types are “string” or str, integer or int, and floating-point or float. The code used for this exercise was:


width = 17
height = 12.0
delimeter = ‘.’
width/2
width/2.0
height/3
1+2*5
delimeter*5


Lab #2: lab two was to make a program that asks the user to enter two integers and should do the operations of sum, difference, product, quotient, reminder and if either the x or y were 0 the program should finish. During this exercise I had problems trying to figure out what was wrong because syntax errors appeared:

 xstr = input('enter the number, x: ')
x = int(xstr)

y_str = input('enter the number, y: ')
y = int (y_str)

my_sum = (x+y)
my_dif = (x-y)
my_product = (x*y)
my_quotient = (x/y)
my_reminder = (x%y)
my_diff = (x < y)
my_less = (x == y)
my_great = (x > y)

print (my_sum)
print (my_dif)
print (my_product)
print (my_quotient)
print (my_reminder)
print (my_diff)
print (my_less)
print (my_great) 

Lab #3: This Lab was based on lab 2, however this time required that the
program should display a menu for the user for each operation.
This time I had to think a little less than the previous
lab and I had some syntax errors that I finally figured out:


print('Addition')
xstr = input('enter the number, x: ')
x = int(xstr)

y_str = input('enter the number, y: ')
y = int (y_str)

my_sum = (x+y)
print (my_sum)

print('Multiplication')
xstr = input('enter the number, x: ')
x = int(xstr)

y_str = input('enter the number, y: ')
y = int (y_str)

my_product = (x*y)
print (my_product)

print('Division')
xstr = input('enter the number, x: ')
x = int(xstr)

y_str = input('enter the number, y: ')
y = int (y_str)

my_quotient = (x/y)
print (my_quotient)

print('Reminder')
xstr = input('enter the number, x: ')
x = int(xstr)

y_str = input('enter the number, y: ')
y = int (y_str)

my_reminder = (x%y)
print (my_reminder)

print('les than')
xstr = input('enter the number, x: ')
x = int(xstr)

y_str = input('enter the number, y: ')
y = int (y_str)

my_diff = (x < y) print(my_diff) print('equal to') xstr = input('enter the number, x: ') x = int(xstr) y_str = input('enter the number, y: ') y = int (y_str) my_less = (x == y) print(my_less) print('Greater than') xstr = input('enter the number, x: ') x = int(xstr) y_str = input('enter the number, y: ') y = int (y_str) my_great = (x > y)
print(my_great)

print('Exit')


LAB #4 Exercise 1 of Chapter 8: was to create "a function that takes
a string as an argument and displays the letters backward, one per line"


fruit = 'banana'
index = 5
for char in fruit:
letter = fruit[index]
print(letter)
index = index - 1


Exercise #3 of lab 4:
This exercise was about the sum of a list of numbers. I had a really hard time trying to figure it out because I kept giving me syntax errors and I had to check very carefully what words I have to write in order to make it work like 'sum', etc.

def cumulative(a):
cumulative = []
sum = 0
for i in a:
sum += i
cumulative.append(sum)

return cumulative
a = [1, 2, 3,]
print(cumulative(a))


App Inventor lab 01: “hellopurr+ vibrate”
This lab shows the basics of App Inventor teaching you how to create with the designer, and to think about what your application will do with the help of the Blocks editor.


download the application!:
https://docs.google.com/file/d/0B8cqU1dKCOpvajhBRExXVDdkR28/edit?usp=sharing

Or use the Barcode:

App Inventor 02″ “PaintPot”
In this lab We had to create an application that lets the user draw on a picture, and also take a picture of their own and draw on it.

Download the app!:

https://docs.google.com/file/d/0B8cqU1dKCOpvcjJVWTczTEozQkU/edit?usp=sharing

Barcode:

MoleMash app:

Last Lab!: Quizme!

Download the app!

https://docs.google.com/file/d/0B8cqU1dKCOpvd1Jfci1oNlhGalE/edit?usp=sharing

Barcode:

Final Project app:
This App was based on the App “MoleMash” and “Presidetns Quiz” found on the App inventor book. Pictures found in the app belong to their proper author and can be found on the web:

Barcode:

Link to the App:

https://docs.google.com/file/d/0B8cqU1dKCOpvNUZneVVZMk9KRm8/edit?usp=sharing