Description
Introduction to Object Oriented Programming
Problem 1
Write a program that prints the text below to the screen.
Output:
Hello World!
Using Python is so easy
I am the ‘King‘ of Python
Save and Run your program.
1- Delivery 1: Document and explain your observations.
Problem 2
In a program put the following expressions in print statements. Use two statements for each expression:
5+3 (Try once with double quotations and once without)
5-3 (Try once with double quotations and once without)
5/2 (Try once with double quotations and once without)
5//2 (Try once with double quotations and once without)
5*2 (Try once with double quotations and once without)
Save and Run your program.
2- Delivery 2: Document your run and explain your observations.
Problem 3
Try these print functions below:
print(“Hello”, “World!”)
print(“Hello “,”World!”)
print(“Hello “, “ World!”)
print(“Hello”, “World!”, sep=”—-“)
s=”Hello World!”
print(s)
Comment at the end if you notice any difference concerning the first 3 functions, if you do not recognize any difference, type N/A.
3- Delivery 3: Your Comments
Problem 4
The following program finds Minimum Number of Coins:
Write it and run it 5 times for 5 different input values. Complete the Table below
Run Input: Outuput
1
2
3
4
5
4- Delivery 4: Table
Problem 5
Write a program that reads an integer N and prints the 2 rightmost digits of N.
Input
328
Output
28
Problem 6
The following program finds Minutes and seconds from seconds.
Write a program to find Hours, Minutes and seconds from seconds. Include comments in your program. Run it 5 times for 5 different input values and complete the following table.
Run Input: Outuput
1
2
3
4
5
5- Delivery 6: Your program and the table.
Deliverables:
A Lab report containing the six delivery items described to be submitted on Blackboard before due Date.
Attention!
Policy on Cheating and Plagiarism:
Plagiarism on assignments and project work is a serious offense. If plagiarism is detected, a student will be subject to penalty, which ranges from receiving a zero on the assignment concerned to an “F” in the course.