Last active
October 25, 2016 09:03
-
-
Save DaraDDB1/514dc632889f329a36cc0ca273f91f37 to your computer and use it in GitHub Desktop.
opencode.py
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": | |
print("YOU ARE READY!") #is you type y it will print you are ready | |
else: | |
sleep(2) | |
print("tough, you are ready now.") #looks like you are ready aha | |
print("Thanks for choosing the PH Scaler.") #youre welcome :) | |
ph = input("Please type your PH balance below and I will tell you whether it is an acid or a base.") | |
if ph == "7" or ph == "8" or ph == "9" or ph == "10" or ph == "11" or ph == "12" or ph == "13" or ph == "14": #these are bases | |
sleep(2) | |
q = input("Does it have a sour taste? If it does, then it is an acid!") | |
if q == "yes" or q == "y": | |
print("Yup, you have an acid!") | |
elif ph == "6" or ph == "5" or ph == "4" or ph == "3" or ph == "2" or ph == "1": #these are acids | |
sleep(5) | |
print("These are all acids, but be careful. If the pH is 1 or 2 it might be battery acid. TAKE CAUTION!") #be VERY CAREFUL!!! | |
#the output will probably go as shown below | |
#there is the welcoming and you will decide whether you want to begin | |
#once you input your pH it will think about the answer for a few secs as i used sleep | |
#it will then print out whether it is an acid or a base | |
#I think that this code will be very useful for students when doing science | |
#as sometimes it is hard to tell whether is is an acid or a basse | |
#i loved learning about this is science and i hope you find this useful | |
#my science teacher is mr mulligan | |
would = input("Do you think you would ever use this?") | |
print("You said ----> " + would) | |
print("Thanks for your feedback!") | |
#i have checked this code on idle | |
#and it works! | |
#it may seem like its not working or its just slow | |
#but that is just the sleep input aha | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment