Python Handy Functions

Hello Programming Heroes! πŸš€ Are you ready to dive into the world of Python?

Jawad
Aug 20, 2023

Today, let’s explore some fantastic functions that will make your coding journey smoother than ever:

1. `round()`: πŸ”„ Need to round off a decimal number? Just use this function!

`num = 3.14159
rounded_num = round(num, 2)
print(rounded_num) # Output: 3.14`

2. `upper()`: πŸ”  Convert text to UPPERCASE with a single command.

`text = "hello world"
uppercase_text = text.upper()
print(uppercase_text) # Output: "HELLO WORLD"`

3. `lower()`: πŸ”‘ Make your text lowercase effortlessly.

`text = "Hello World"
lowercase_text = text.lower()
print(lowercase_text) # Output: "hello world"`

Python has your back with its versatile tools. So, buckle up and let's uncover the magic of these functions! πŸ’»πŸβœ¨

--

--

Jawad

Self-taught Software Engineering Student at OSSU | want to connect with me? Mail- abidibnazam@gmail.com