From bd85f721864e70a53e169d985f70e38b83ccbc2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Fri, 8 Dec 2023 19:24:42 +0000 Subject: [PATCH] Add the worst python script ever written --- README.org | 2 +- peterson.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 peterson.py diff --git a/README.org b/README.org index de4d854..c11e52b 100644 --- a/README.org +++ b/README.org @@ -1,7 +1,7 @@ * Python utilities for personal and fannish purposes - =ao3scrape.py= – downloads all an author’s works from AO3 (notes [[https://tobli.dreamwidth.org/45337.html][here]]) - =cellopractice.py= – selects some exercises from Walter Mengler’s /Fit in 15 Minutes/, according to the author’s recommendations -- =fic-header.py= – automates, as much as possible, the creation of a fic header for my website +- =peterson.py= – questions everything - =promptscrape.py= – scrapes Dreamwidth writing challenge communities for prompts - =randomline.py= – returns a random line from a file - =sponge.py= – fOrMaTs tExT LiKe tHiS diff --git a/peterson.py b/peterson.py new file mode 100644 index 0000000..86b5c5c --- /dev/null +++ b/peterson.py @@ -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 + "”?")