Created
January 26, 2024 18:38
-
-
Save matthewpoer/5b9bccd93646e50c9824e93c4ad708eb to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
import requests | |
f=o=i=p="" | |
while not (f and o and i and p): | |
for word in requests.get("https://random-word-api.herokuapp.com/word?lang=en&number=50").json(): | |
if word[0] == "f": | |
f = word | |
if word[0] == "o": | |
o = word | |
if word[0] == "i": | |
i = word | |
if word[0] == "p": | |
p = word | |
print(f"{f} {o} {i} {p}".title()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment