01. Write a python program to print the following string in a specific format (see the
output). Go to the editor
Sample String: Sample String : "Twinkle, twinkle, little star, How I
wonder what you are! Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are"
# Hints
# Using \n (newline) and \t (tab) to format the string
# Output :
print("Twinkle, twinkle, little star, \n \t How I wonder what you are! , \n \t\t Up above the world so high,\n \t\t Like a diamond in the sky. \n Twinkle, twinkle, little star, , \n \t How I wonder what you are")
#Print string solution
Print("Twinkle, twinkle, little star, \n \t How I wonder what you
are! , \n \t\t Up above the world so high,
\n \t\t Like a diamond in the sky. \n Twinkle, twinkle, little star, , \n
\t How I wonder what you are")
No comments:
Post a Comment