Computer Science, asked by mayanksagar46, 10 months ago

Write a pyhton program using variables to find the cost of 17 pencils if the cost of one pencil= 2.50
Output should be
Cost of 1 pencil = 2.5
Cost of 17 pencils = 42.5​

Answers

Answered by Vaibhavvsvs81
2

no_of_pencil = int("Enter the no of pencil ")

cost_of_one_pencil = 2.5

cost_of_all_pencils = no_of_pencil * cost_of_one_pencil

print("Cost of pencils", cost_of_all_pencils)

Similar questions