Skip to content

Commit 35c8ce0

Browse files
authored
Create simple_utils.py
1 parent ef04b8d commit 35c8ce0

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)