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
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
Social Sciences,
5 months ago
Math,
5 months ago
Economy,
5 months ago
English,
10 months ago
Computer Science,
10 months ago
Math,
1 year ago
History,
1 year ago