Ict Phyton GG Well Played

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Miguel Angel Villamizar Angarita Fuentes Mora

1.

Text=("Hello, my name is %s and I am %s years old. I live in %s with my mom %s and my dad %s. I
study at %s and my favorite subject is %s, also, my favorite sport is %s.")

name=("Miguel")

years=("14")

place_of_live=("Colombia")

mom=("Alid")

dad=("Edgar")

school=("Newport School")

subject=("math")

sport=("soccer")

print(Text % (name,years,place_of_live,mom,dad,school,subject,sport))

2.

Define the variables for the following items. Use the name indicated
for each
variable.
PP=int(input("What is the price of 1 pound of Pasto potatoes? Plis type the price."))

PPN=int(input("Type the amount of items that you want of Pasto potatoes"))

CP=int(input("What is the price of 1 pound of Criolla potatoes? Plis type the price."))

CPN=int(input("Type the amount of items that you want of Criolla potatoes"))

P=int(input("What is the the price of one unit of Platain? Plis type the price."))

PN=int(input("Type the amount of items that you want of Platain"))

PC=int(input("What is the price of 500 grams of Parmesan Cheese? Plis type the price."))

PCN=int(input("Type the amount of items that you want of Parmesan Cheese"))

MC=int(input("What is the price of 500 grams of Mozzarella cheese? Plis type the price."))
MCN=int(input("Type the amount of items that you want of Mozzarella cheese"))

Create a program that ask the user the for the price and the amount
they’re buying
for each product, and then use the data to multiply the amount by
the prices, and
calculate and display the total cost of the purchase with a receipt format.
(40p)
Receipt format example:
PP=int(input("What is the price of 1 pound of Pasto potatoes? Plis type the price."))

PPN=int(input("Type the amount of items that you want of Pasto potatoes"))

CP=int(input("What is the price of 1 pound of Criolla potatoes? Plis type the price."))

CPN=int(input("Type the amount of items that you want of Criolla potatoes"))

P=int(input("What is the the price of one unit of Platain? Plis type the price."))

PN=int(input("Type the amount of items that you want of Platain"))

PC=int(input("What is the price of 500 grams of Parmesan Cheese? Plis type the price."))

PCN=int(input("Type the amount of items that you want of Parmesan Cheese"))

MC=int(input("What is the price of 500 grams of Mozzarella cheese? Plis type the price."))

MCN=int(input("Type the amount of items that you want of Mozzarella cheese"))

print("Papa pastusa")

print(PP*PPN)

print("Criolla potatoes")

print(CP*CPN)

print("Platain")

print(P*PN)

print("Parmesan cheese")

print(PC*PCN)

print("Mozzarella cheese")

print(MC*MCN)
3.

PP=int(input("What is the price of 1 pound of Pasto potatoes? Plis type the price."))

PPN=int(input("Type the amount of items that you want of Pasto potatoes"))

CP=int(input("What is the price of 1 pound of Criolla potatoes? Plis type the price."))

CPN=int(input("Type the amount of items that you want of Criolla potatoes"))

P=int(input("What is the the price of one unit of Platain? Plis type the price."))

PN=int(input("Type the amount of items that you want of Platain"))

PC=int(input("What is the price of 500 grams of Parmesan Cheese? Plis type the price."))

PCN=int(input("Type the amount of items that you want of Parmesan Cheese"))

MC=int(input("What is the price of 500 grams of Mozzarella cheese? Plis type the price."))

MCN=int(input("Type the amount of items that you want of Mozzarella cheese"))

print("Papa pastusa")

print(PP*PPN)

print("Criolla potatoes")

print(CP*CPN)

print("Platain")

print(P*PN)

print("Parmesan cheese")

print(PC*PCN)

print("Mozzarella cheese")

print(MC*MCN)

amount=int(input("How much money do you have"))

total1=(PP*PPN)+(CP*CPN)+(P*PN)+(PC*PCN)+(MC*MCN)

text=("Your change is %s welcome back and thanky you for the buy")

total2=(amount-total1)
print(text %(total2))

4.

hs=(2.8)

hw=(3.1)

hs2=(hs*hs)

hw2=(hw*hw)

ac=(hs2+hw2)

final=(ac**(1/2))

print(final)

You might also like