Skip to content

Commit 311f68a

Browse files
Merge pull request #1 from RandomCoderTinker/add-utils
Create simple_utils.py
2 parents 2e26007 + 2345fee commit 311f68a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

simple_utils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# simple_utils.py - A tiny utility library
2+
3+
def reverse_string(text):
4+
"""Reverses the characters in a string."""
5+
return text[::-1]
6+
7+
def count_words(sentence):
8+
return len(sentence.split())
9+
10+
def celsius_to_fahrenheit(celsius):
11+
return (celsius * 9/5) + 32

0 commit comments

Comments
 (0)