You are on page 1of 2

De La Salle University - Dasmariñas 1

CEAT – Engineering Department

T-CPET121LA – Introduction to Computational Thinking


ENABLING ASSESSMENT 2: Python I/O and Arithmetic Operators
Name: ____________________________________________________________
Year and Section: _______________________ Date: _______________________ Rating:

OBJECTIVES
ü Perform input and output functions in python language
ü Apply arithmetic operations
ü Provide problem solutions through python programming

INSTRUCTION: Provide the Python script as your analysis and solution of the following problems.

1. Display the simple text below with the tabs and newline.
One
Two Three
Four Five Six
Seven Eight Nine Ten

print('One \n'+'Two Three \n'+'Four Five Six \n'+'Seven Eight Nine Ten')

2. Input a name, insect, animal, verb and an adjective to replace up the missing lyrics of the song.
Take a little time (name)
See the (insect)’s color
Listen to the (animal) that were sent
To (verb) for me and you
Can you feel me
This is such a (adjective) place to be

name = input('Input a name: ')


insect = input('Input a insect: ')
animal = input('Input a animal: ')
verb = input('Input a verb: ')
adjective = input('Input a adjective: ')

print("-"* 30)
print('Take a little time ', name, '\nSee the ', insect, "'s color \nListen to the ", animal, " that were sent \nTo ", verb, " for
me and you \nCan you feel me \nThis is such a ", adjective, " place to be \n",)

3. On their way to their mission, Naruto, Sasuke and Sakura paid their hotel rent for a total of 225 ryo. Naruto paid
25 ryo, Sasuke paid 80 ryo while Sakura paid the remaining balance. Compute and display their total
contribution in percentage.
Naruto = 25
Sasuke = 80
Sakura = 120
Total_rent = 255

Naruto_contribution = round((Naruto/Total_rent)*100)
T-CPET121LA
Introduction to Computational Thinking
De La Salle University - Dasmariñas 2
CEAT – Engineering Department

Sasuke_contribution = round((Sasuke/Total_rent)*100)
Sakura_contribution = round((Sakura/Total_rent)*100)

print("The total contribution of the hotel rent")


print("-"*30)
print("Naruto : ", Naruto_contribution,"%")
print("Sasuke : ", Sasuke_contribution,"%")
print("Sakura : ", Sakura_contribution,"%")

4. Assuming that the customer bought three items. Input the price of each items and the customer’s payment and
display the customer’s change.
First_item = int(input("Input the price of the First item: "))
Second_item = int(input("Input the price of the Second item: "))
third_item = int(input("Input the price of the Third item: "))
payment = int(input("Input your payment: "))

change = payment - (First_item + Second_item + third_item)

print("-"*30)
print("The customer's change is ", change, "pesos")

T-CPET121LA
Introduction to Computational Thinking

You might also like