Using Python to Solve Java Problems | Solving Chapter 1 Exercise 15
In this video, I will tackle the programming exercises found in DS Malik's book Java Programming - From Problem Analysis to Program Design 5th Edition, particularly in Chapter 1 Exercise #15.
The Problem:
To make a profit, the prices of the items sold in a furniture store are marked up by 80%. After marking up the prices each item is put on sale at a discount of 10%. Design an algorithm to find the selling price of an item sold at the furniture store.
What information do you need to find the selling price?
Answer: We need the price of each item.
Algorithm
1. Open data file for processing.
2. Define variables of the following:
marked up price
selling price (discounted price)
3. Repeat following steps until no more data to process:
3a. Read furniture data (item name, item price)
3b. Calculate marked up price using the following formula:
marked up price = item price * 0.8 + item price; or
marked up price = item price * 1.8
3c. Calculate selling price (discounted price) using the formula:
selling price = marked up price - (marked up price * 0.1)
3d. Print item name, item price, marked up price, and selling price
4. Done.
I hope you will learn from this video. If you have any suggestions, questions, or clarifications, please leave your comments below.
And don't forget to subscribe to get updated with the next videos in this series.
Music Credit: See You On The Otherside - The 126ers
https://www.youtube.com/channel/UCep47rkC_STH4BdGVUTeMnw
#python #intermediate #programming #java #computerprogramming
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Using Python to Solve Java Problems | Solving Chapter 1 Exercise 15», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.