diff --git a/hello_world/facts.txt b/hello_world/facts.txt new file mode 100644 index 0000000..8c3dceb --- /dev/null +++ b/hello_world/facts.txt @@ -0,0 +1,3 @@ +Bananas are berries, but strawberries aren't. +Honey never spoils. Archaeologists have found pots of honey in ancient Egyptian tombs that are over 3000 years old and still perfectly edible. +A day on Venus is longer than a year on Venus. diff --git a/hello_world/main.py b/hello_world/main.py new file mode 100644 index 0000000..eebdeee --- /dev/null +++ b/hello_world/main.py @@ -0,0 +1,14 @@ +import random + +def read_facts(file_path): + with open(file_path, 'r') as file: + facts = file.readlines() + return [fact.strip() for fact in facts] + +def main(): + facts = read_facts('facts.txt') + interesting_fact = random.choice(facts) + print("Hello, World! Did you know? " + interesting_fact) + +if __name__ == '__main__': + main()