- Create a string and print it.
- Take a string input and print it's length.
- Print the last word of the string
Python is great
using slices. - Print the each word in different line of string
python is everywhere
. - Print the string
Hello World!
in reverse. - Convert the string
How are you?
in uppercase. - Convert the string
How Is It Going?
in lowercase. - Join the following list by spaces(
words = ['Python', 'is', 'easy', 'to', 'learn']
- Print a multiline string using a single
print
- Print this string
to move to newline '\n' is used.
(results should look exactly like the provided string) - Print a variable with some text using a single print function, output should look like following.
the variable is 15
- concatenate the following strings and print the result
s1 = 'python ' s2 = 'is ' s3 = 'great.'
- Print
#
20 times without using a loop - Print numbers from 1 to 9, each on a seperate line, followed by a dot, output should look like the following-
1. 2. 3.
- Ask user to input a sentence and print each word on a different line.
- Ask user to input a string and check if the string ends with '?'
- Ask user to input a string and print how many times
e
appeared in the string - Check if the user input is a number.
- Remove the extra spaces in beginning and in the end of the following string-
text = ' this is not a good string '
- Ask user to input string, print
found
if any of the character is upper case. - Extract names from the following string and store them in a list.
names = 'Joe, David, Mark, Tom, Chris, Robert'
- In the following string, add
aye
in the end of every word and print the results.text = 'this is some text'
- ask user to enter a string and check if the string contains
fyi
- Remove all the special characters and numbers from the following string
text = '%p34@y!*-*!t68h#&on404'
- calculate the average word length of the following paragraph.
this is a paragraph which is written just for the purpose of providing content to let the average word length be calculated