From 256294461584616cc7e770566f4c4725b6b97317 Mon Sep 17 00:00:00 2001 From: Joon Lee Date: Mon, 14 Jul 2025 21:32:23 -0700 Subject: [PATCH] Add simple utility functions --- python/simple_utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 python/simple_utils.py diff --git a/python/simple_utils.py b/python/simple_utils.py new file mode 100644 index 0000000..07368cd --- /dev/null +++ b/python/simple_utils.py @@ -0,0 +1,12 @@ +# simple_utils.py - A tiny utility library + +def reverse_string(text): + """Reverses the characters in a string.""" + return text[::-1] + +def count_words(sentence): + return len(sentence.split()) + +def celsius_to_fahrenheit(celsius): + return (celsius * 9/5) + 32 +