Add the worst python script ever written

This commit is contained in:
trémeur 2023-12-08 19:24:42 +00:00
parent 51db55ed9b
commit bd85f72186
2 changed files with 20 additions and 1 deletions

19
peterson.py Normal file
View file

@ -0,0 +1,19 @@
import time
thesentence = input("Provide a sentence:\n\n")
if thesentence[-1] == "?" or thesentence[-1] == "!" or thesentence[-1] == ".":
newsentence = thesentence[:-1]
else:
newsentence = thesentence
partone = newsentence[0]
parttwo = newsentence[1:]
newpartone = partone.lower()
if newsentence[:2] == "I ":
thirdsentence = newsentence
else:
thirdsentence = newpartone + parttwo
words = thirdsentence.split()
print("")
for word in words:
time.sleep(0.3)
print("What do you mean “" + word + "”?")