This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": |