LAB 0
Lab Description:
This is an example how your lab reports should look like.
Code:
Screenshots:
LAB 1
Lab Description:
This lab about learning the syntax errors and creating a calculator that calculates your meal. With this program, you can calculate your meal’s tips by entering the meal value.
Codes:
meal = 44.50
tax = 0.0675
tip = 0.15
meal = meal + meal * tax
total=meal+meal*tip
Screenshot:
Lab 2 (Turtle Blast)
Lab Description: In this lab, we will use turtle to draw a shape. With different codes you can create different shapes and pictures. Many shapes and drawings can be done with this program.
Codes:
import turtle
import random
wn = turtle.Screen()
wn.bgcolor(“red”)
WM = turtle.Turtle()
WM.color(“white”)
for i in range (100):
WM.forward(55)
WM.back(55)
WM.right(20)
WM.forward(122)
WM.back(122)
WM.right(2)
WM.forward(50)
WM.back(50)
WM.right(22)
Lab 3 (Date and Time)
Lab Description:
In this lab, we will learn how to create a python program to print the current time and date. This program will output the date and time at the inputs of the keyboard.
Codes:
from datetime import datetime
now = datetime.now()
print ‘%s/%s/%s %s:%s:%s’ % (now.month, now.day, now.year, now.hour, now.minute, now.second)
Lab 5 (Taking a Vacation)
Lab description:
In this lab, we will learn how to program a program that will calculate your cost for a vacation with the enter of numbers. By entering where you want to go, how many days and the extra money you want to spend, you can find out the total cost.
Codes:
def hotel_cost(nights):
return 140*nights
def plane_ride_cost(city):
if city==”Charlotte”:
return 183
elif city==”Tampa”:
return 220
elif city==”Pittsburgh”:
return 222
elif city==”Los Angeles”:
return 475
def rental_car_cost(days):
cost=40*days
if days>=7:
cost -=50
elif days>=3:
cost -=20
return cost
def trip_cost(city,days,spending_money):
return rental_car_cost(days)+hotel_cost(days)+plane_ride_cost(city)+spending_money
print trip_cost(“Los Angeles”,5,600)
Screenshot:
Lab 7 (Paint Pot)
Lab Description
In this lab, I’ve learned how to create a andriod app that can take pictures and draw lines on the picture. This is lab taught me a lot about building and creating apps.
Screenshot:
Lab 8 (MoleMash)
Lab Description
In this lab, I’ve learned how to create an android game called MoleMash. During this creation, I learned how to make a sprite move, vibrate when touched, and keep score. This is the basics of creating more complicated apps.
Screenshot:
Lab 9 (President’s Quiz)
Lab Description:
In this lab, I learned how to create an app that appears like a quiz. During the creation of this app, l learned how to create questions and answers, and even in a multiple choice format and use lists.
ScreenShots:
Final Project (Menken)
Lab Description:
In this lab, I created a quiz app. Although only that people play the game league of legends may refer to this quiz, it is a very fun app. This app will buzz if you get an incorrect answer and go on with the next picture if your answer is correct.
ScreenShots: