Skip to content

Instantly share code, notes, and snippets.

@DaraDDB1
DaraDDB1 / STJLOL-DC-opencode.py
Last active October 25, 2016 09:03
opencode.py
from time import sleep
while True:
print("This is the PH Scaler!") #this is a print statement
choice = input("Are you ready? Type y for yes")
if choice == "y":
@DaraDDB1
DaraDDB1 / forloops.py
Last active October 4, 2016 09:42
STJLOL-DC-forloops.py
#this code is the for loop
#easy task
bag = ["iPad", "pencil case", "books", "lunch"] #this is whats in the bag
for item in bag:
if item == "iPad":
print("Hey, look! I have your iPad!") #when ipad comes through, it will print this
else:
print("This isn't an iPad!") #if it isnt ipad, it will print this
@DaraDDB1
DaraDDB1 / phscale.py
Created September 22, 2016 14:34
STJLOL-DC-phscale
while True:
print("Hello, and welcome to the Acid/Base Detector! Type your number below and I will tell you whether it is an acid or a base!")
ph = input("Please type your number between 0 and 14 here ----> ")
if ph <= "7":
choice=input("Does it have a sour taste? Type Y or N -----> ")
if choice == "Y":
print("Looks like you have an acid on your hands! Be very careful!")
elif choice == "N":