PHP Basic Tasks
By Webotapp Academy•
<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">Task 1</h3>\n<!-- /wp:heading -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>Everyday you put 10 litres petrol;\n\neveryday you save 1 litre of petrol;\n\nyour tank capacity is 52 litres;\n\n Q. How many days it will take to make your tank full;</code></pre>\n<!-- /wp:code -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">Task 2</h3>\n<!-- /wp:heading -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>There is an atm machine \n\nTotal money in the atm: 10,00,000 cash money\n\n\nNotes in the atm = 500, 200, 100\n\n500 notes are 50%\n200 notes are 25%\n100 notes are 25%\n\nObjective = If any user comes to us, withdraw money he should get the notes the the proportion of 50:25:25</code></pre>\n<!-- /wp:code -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">Task 3</h3>\n<!-- /wp:heading -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>Everyday you fill your water tank with 25 liters of water;\neveryday you use 10% of the water in the tank for household chores;\nyour water tank can hold 200 liters of water;\nHow many days will it take for your water tank to be full again?</code></pre>\n<!-- /wp:code -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">Task 4</h3>\n<!-- /wp:heading -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>Everyday you produce 100 units of a certain product;\neveryday you sell 20% of the total units produced;\nevery 5th day, you lose 10 units due to a production error;\nyour storage warehouse can hold 500 units of the product;\nHow many days will it take for your storage warehouse to be full again?</code></pre>\n<!-- /wp:code -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">Task 5</h3>\n<!-- /wp:heading -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>Define variables for three products, where each product has a name, price, and quantity.\nCalculate the subtotal of each product (price * quantity).\nApply any applicable discounts to the subtotal of each product.\nCalculate the total cost of all products after applying discounts.\nAdd tax (e.g., 8%) to the total cost.\nPrint or return the final total cost, rounded to two decimal places.</code></pre>\n<!-- /wp:code -->\n\n<!-- wp:heading {\"level\":3} -->\n<h3 class=\"wp-block-heading\">Task 6</h3>\n<!-- /wp:heading -->\n\n<!-- wp:code -->\n<pre class=\"wp-block-code\"><code>Define variables for the quantity and price of each item in the shopping cart.\nApply a discount of 5% if the quantity of any single item exceeds 10.\nApply a discount of 10% if the total quantity of all items exceeds 30.\nCalculate tax (e.g., 8%) on the total cost after applying discounts.\nPrint or return the final total cost, rounded to two decimal places.</code></pre>\n<!-- /wp:code -->