SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a function that will ask the user to enter the price of a commodity, calculate and display
the price, the tax calculated at 7.5% of the prices and the total value of the commodity (price
+tax). Use 2 decimal places for monetary values. def commedity yaluel):
price=float[input("Enterthecommodityprice:?)tax=price7.5/100total=price+taxprinttPrice=$form
at(price,,.5P),Tax$+format(tax,.2P),Value=$+format(total,:.2P)) Write a caller function main that
will call comoredity walue. It is always a good practice to a single function that will serve as
interface to your program. def main(): cemmedity yalued) Write a statement that will call main.
main()

More Related Content

More from amanstudio07860

Write an application that ask the user to enter 2 integers, obtains.pdf
 Write an application that ask the user to enter 2 integers, obtains.pdf Write an application that ask the user to enter 2 integers, obtains.pdf
Write an application that ask the user to enter 2 integers, obtains.pdfamanstudio07860
 
Write a single C statement that corresponds to the two MIPS assembly .pdf
 Write a single C statement that corresponds to the two MIPS assembly .pdf Write a single C statement that corresponds to the two MIPS assembly .pdf
Write a single C statement that corresponds to the two MIPS assembly .pdfamanstudio07860
 
Write a recursive function elemAt that returns the ith item of the li.pdf
 Write a recursive function elemAt that returns the ith item of the li.pdf Write a recursive function elemAt that returns the ith item of the li.pdf
Write a recursive function elemAt that returns the ith item of the li.pdfamanstudio07860
 
Write a recursive function flip that takes a list of pairs, and retu.pdf
 Write a recursive function flip that takes a list of pairs, and retu.pdf Write a recursive function flip that takes a list of pairs, and retu.pdf
Write a recursive function flip that takes a list of pairs, and retu.pdfamanstudio07860
 
Write a Python module called inches2centimeters that will accept one .pdf
 Write a Python module called inches2centimeters that will accept one .pdf Write a Python module called inches2centimeters that will accept one .pdf
Write a Python module called inches2centimeters that will accept one .pdfamanstudio07860
 
Write a Python program that can perform the following operations on a.pdf
 Write a Python program that can perform the following operations on a.pdf Write a Python program that can perform the following operations on a.pdf
Write a Python program that can perform the following operations on a.pdfamanstudio07860
 
Write a program that stores integers in a linked list. Please refer t.pdf
 Write a program that stores integers in a linked list. Please refer t.pdf Write a program that stores integers in a linked list. Please refer t.pdf
Write a program that stores integers in a linked list. Please refer t.pdfamanstudio07860
 
Write a program that creates 2 Lists. The first is the list of names .pdf
 Write a program that creates 2 Lists. The first is the list of names .pdf Write a program that creates 2 Lists. The first is the list of names .pdf
Write a program that creates 2 Lists. The first is the list of names .pdfamanstudio07860
 
Write a program that implements a function. The function should creat.pdf
 Write a program that implements a function. The function should creat.pdf Write a program that implements a function. The function should creat.pdf
Write a program that implements a function. The function should creat.pdfamanstudio07860
 
Write a program named ArrayDemo that stores an array of 10 integers. .pdf
 Write a program named ArrayDemo that stores an array of 10 integers. .pdf Write a program named ArrayDemo that stores an array of 10 integers. .pdf
Write a program named ArrayDemo that stores an array of 10 integers. .pdfamanstudio07860
 
Write a Java program to represent a family tree. A sample family tree.pdf
 Write a Java program to represent a family tree. A sample family tree.pdf Write a Java program to represent a family tree. A sample family tree.pdf
Write a Java program to represent a family tree. A sample family tree.pdfamanstudio07860
 
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
 Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdfamanstudio07860
 
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
 Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdfamanstudio07860
 
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
 With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdfamanstudio07860
 
With careful auscultation, vou can often detect splitting of the hear.pdf
 With careful auscultation, vou can often detect splitting of the hear.pdf With careful auscultation, vou can often detect splitting of the hear.pdf
With careful auscultation, vou can often detect splitting of the hear.pdfamanstudio07860
 
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
 Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdfamanstudio07860
 
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
 Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdfamanstudio07860
 
Write a java code to construct an AVL tree by inserting the following.pdf
 Write a java code to construct an AVL tree by inserting the following.pdf Write a java code to construct an AVL tree by inserting the following.pdf
Write a java code to construct an AVL tree by inserting the following.pdfamanstudio07860
 
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
 Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdfamanstudio07860
 
Why is it important that FINANCIAL accounting provide a common set of.pdf
 Why is it important that FINANCIAL accounting provide a common set of.pdf Why is it important that FINANCIAL accounting provide a common set of.pdf
Why is it important that FINANCIAL accounting provide a common set of.pdfamanstudio07860
 

More from amanstudio07860 (20)

Write an application that ask the user to enter 2 integers, obtains.pdf
 Write an application that ask the user to enter 2 integers, obtains.pdf Write an application that ask the user to enter 2 integers, obtains.pdf
Write an application that ask the user to enter 2 integers, obtains.pdf
 
Write a single C statement that corresponds to the two MIPS assembly .pdf
 Write a single C statement that corresponds to the two MIPS assembly .pdf Write a single C statement that corresponds to the two MIPS assembly .pdf
Write a single C statement that corresponds to the two MIPS assembly .pdf
 
Write a recursive function elemAt that returns the ith item of the li.pdf
 Write a recursive function elemAt that returns the ith item of the li.pdf Write a recursive function elemAt that returns the ith item of the li.pdf
Write a recursive function elemAt that returns the ith item of the li.pdf
 
Write a recursive function flip that takes a list of pairs, and retu.pdf
 Write a recursive function flip that takes a list of pairs, and retu.pdf Write a recursive function flip that takes a list of pairs, and retu.pdf
Write a recursive function flip that takes a list of pairs, and retu.pdf
 
Write a Python module called inches2centimeters that will accept one .pdf
 Write a Python module called inches2centimeters that will accept one .pdf Write a Python module called inches2centimeters that will accept one .pdf
Write a Python module called inches2centimeters that will accept one .pdf
 
Write a Python program that can perform the following operations on a.pdf
 Write a Python program that can perform the following operations on a.pdf Write a Python program that can perform the following operations on a.pdf
Write a Python program that can perform the following operations on a.pdf
 
Write a program that stores integers in a linked list. Please refer t.pdf
 Write a program that stores integers in a linked list. Please refer t.pdf Write a program that stores integers in a linked list. Please refer t.pdf
Write a program that stores integers in a linked list. Please refer t.pdf
 
Write a program that creates 2 Lists. The first is the list of names .pdf
 Write a program that creates 2 Lists. The first is the list of names .pdf Write a program that creates 2 Lists. The first is the list of names .pdf
Write a program that creates 2 Lists. The first is the list of names .pdf
 
Write a program that implements a function. The function should creat.pdf
 Write a program that implements a function. The function should creat.pdf Write a program that implements a function. The function should creat.pdf
Write a program that implements a function. The function should creat.pdf
 
Write a program named ArrayDemo that stores an array of 10 integers. .pdf
 Write a program named ArrayDemo that stores an array of 10 integers. .pdf Write a program named ArrayDemo that stores an array of 10 integers. .pdf
Write a program named ArrayDemo that stores an array of 10 integers. .pdf
 
Write a Java program to represent a family tree. A sample family tree.pdf
 Write a Java program to represent a family tree. A sample family tree.pdf Write a Java program to represent a family tree. A sample family tree.pdf
Write a Java program to represent a family tree. A sample family tree.pdf
 
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
 Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
Worksheet No. 3 - Upper left side of the worksheet, prepare the State.pdf
 
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
 Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
Wones Trading Card Inventory Purchases On April 15, Wong sells 4,000.pdf
 
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
 With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
With FOB+DA+ shipping as the terms of trade, a group of two people t.pdf
 
With careful auscultation, vou can often detect splitting of the hear.pdf
 With careful auscultation, vou can often detect splitting of the hear.pdf With careful auscultation, vou can often detect splitting of the hear.pdf
With careful auscultation, vou can often detect splitting of the hear.pdf
 
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
 Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
Wildhorse Inc. issued $928,000 of 10 -year, 3 bonds on January 1,202.pdf
 
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
 Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
Wildhorse Ltd. is a private company reporting under ASPE. Its income .pdf
 
Write a java code to construct an AVL tree by inserting the following.pdf
 Write a java code to construct an AVL tree by inserting the following.pdf Write a java code to construct an AVL tree by inserting the following.pdf
Write a java code to construct an AVL tree by inserting the following.pdf
 
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
 Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
Why was Pluto demoted to a Dwart Planet What is required of a celest.pdf
 
Why is it important that FINANCIAL accounting provide a common set of.pdf
 Why is it important that FINANCIAL accounting provide a common set of.pdf Why is it important that FINANCIAL accounting provide a common set of.pdf
Why is it important that FINANCIAL accounting provide a common set of.pdf
 

Recently uploaded

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 

Recently uploaded (20)

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 

Write a function that will ask the user to enter the price of a commo.pdf

  • 1. Write a function that will ask the user to enter the price of a commodity, calculate and display the price, the tax calculated at 7.5% of the prices and the total value of the commodity (price +tax). Use 2 decimal places for monetary values. def commedity yaluel): price=float[input("Enterthecommodityprice:?)tax=price7.5/100total=price+taxprinttPrice=$form at(price,,.5P),Tax$+format(tax,.2P),Value=$+format(total,:.2P)) Write a caller function main that will call comoredity walue. It is always a good practice to a single function that will serve as interface to your program. def main(): cemmedity yalued) Write a statement that will call main. main()