From 39201ace61b8a0d6be6149989830e221c60acd3a Mon Sep 17 00:00:00 2001 From: Ruffelsforralph Date: Fri, 15 Aug 2025 11:25:52 -0700 Subject: [PATCH 1/2] Create simple_utils.py Test - A tiny utility library --- python/simple_utils.py | 9 +++++++++ 1 file changed, 9 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..9963174 --- /dev/null +++ b/python/simple_utils.py @@ -0,0 +1,9 @@ +# 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 From 0081535c4e48c33ccd2e5a541c8c07feb1985a04 Mon Sep 17 00:00:00 2001 From: Ruffelsforralph Date: Sat, 16 Aug 2025 21:56:33 -0700 Subject: [PATCH 2/2] Update python/simple_utils.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- python/simple_utils.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/python/simple_utils.py b/python/simple_utils.py index 9963174..1ddd31b 100644 --- a/python/simple_utils.py +++ b/python/simple_utils.py @@ -1,9 +1,14 @@ # simple_utils.py - A tiny utility library def reverse_string(text): -"""Reverses the characters in a string. -return text[::-1] -""" + """Return the reverse of the input string.""" + return text[::-1] + + def count_words(sentence): -return len(sentence.split()) + """Return the number of whitespace-separated words in the sentence.""" + return len(sentence.split()) + + def celsius_to_fahrenheit(celsius): -return (celsius * 9/5) + 32 + """Convert Celsius to Fahrenheit.""" + return (celsius * 9 / 5) + 32