Last active
August 12, 2021 03:55
-
-
Save adammelancon/26ca30cf5b1ee251920ab444f7a5d4ad to your computer and use it in GitHub Desktop.
Python Lyics - Slim Shady
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 os import system, name | |
hi = "Hi!" | |
mni = "My name is! " | |
ss = " Slim Shady " | |
#function to clear the screen between answers | |
def clear(): | |
# for windows | |
if name == 'nt': | |
_ = system('cls') | |
# for mac and linux(here, os.name is 'posix') | |
else: | |
_ = system('clear') | |
# main song function | |
def slimshady(): | |
# setting up a few variables | |
w = "" | |
whom = "" | |
ww = "" | |
# check for "what" | |
while True: | |
print("") | |
print(" " + hi + " " + mni) | |
w = input("SHOUT BACK: ") | |
clear() | |
if w.lower() != str("what"): | |
print("") | |
print("WRONG LYRIC DUMMY!") | |
continue | |
else: | |
print("") | |
break | |
# check for "who" | |
while True: | |
print(" " + w.upper() + ", " + mni) | |
whom = input("SHOUT BACK: ") | |
clear() | |
if whom.lower() != str("who"): | |
print("") | |
print("WRONG LYRIC DUMMY!") | |
continue | |
else: | |
print("") | |
break | |
# check for either a few different scratch types, because why not. | |
while True: | |
print(" " + whom.upper() + ", " + mni) | |
ww = input("GIVE ME SOME TURN TABLES: ") | |
clear() | |
print("") | |
if ww.lower() not in ("wikki wikki", "wikka wikka", "wikkiwikki", "wikkawikka", "chickachicka", "chicka chicka", "chika chika", "chikachika"): | |
print("") | |
print("WRONG SCRATCH DUMMY!") | |
print("") | |
continue | |
else: | |
print("") | |
break | |
print(" " + ww.upper() + ", " + ss) | |
print("") | |
input("Press Enter to continue...") | |
clear() | |
clear() | |
slimshady() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to add conditionals.