Challenge: Text Report

Lab Python Beginner 10 points

Read a sentence and print a short report about it:

Upper: <sentence in capitals>
Characters: <number of characters>
Words: <number of words>
Reversed: <sentence backwards>

Input

One line of text.

Output

The four lines shown above.

Example

Input

Python is fun

Output

Upper: PYTHON IS FUN
Characters: 13
Words: 3
Reversed: nuf si nohtyP
Sample input available Sample output available
Editor
Python

Hints

len(text) counts characters; len(text.split()) counts words.

text[::-1] reverses a string.

Solution explanation

Each line uses one tool from this module: upper(), len(), split() and slicing with a step of -1.

Show solution
text = input()
print(f"Upper: {text.upper()}")
print(f"Characters: {len(text)}")
print(f"Words: {len(text.split())}")
print(f"Reversed: {text[::-1]}")
Output
Answer
HOME LEARN COMMUNITY DASHBOARD