

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
basic knowledge about python basic knowledge about python
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Homework 1
top of your homework: Full name: Student id: Class:
the output). 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" Output : 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
Output: (Guide: google seach “Python 3 Escape Sequences”)
Given: number1 = 40 number2 = 30 Expected Output: The result:
Product: 1200 Sum: 70
learned, in which the output will look like
printed out. Try adding a star border on the sides as well now.
the given string, array, list, tuple, dictionary, etc. Find the length of the following 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"
formatting of a print() function Expected Output : Use print() statement formatting to display ** separator between each word. For example: print('My', 'Name', 'Is', 'James') will display MyNameIsJames