Product Sale Problem in Python || Lesson 21 || Python Placements || Learning Monkey || смотреть онлайн
#pytho #learningmonke #pythoncodin #placement #pythontutorial #pythoncours #pythonforbeginner #pythonfordatascienc #pythonfullcours #pythonprogrammin #pythonfreecourse
Product Sale Problem in Python
In this class, we write a program for Product Sale Problem in Python.
Product Sale Problem
All these examples. Will help you a lot in improving your coding skill.
Read the question try to solve it on your own before you check for a solution.
The reader should have the basics of python. To solve these problems. Click here.
Q1) A company digicomparts manufactures 52 types of unique products for laptop and desktop computers.
It manufactures ten types of laptop products and 42 types of desktop products.
Each product manufactured by the company had unique id’s from a-z and A-Z.
The laptop products have product id’s (a,e,i,o,u,A,E,I,O,U).
The rest of the product IDs are assigned to desktop products.
The company manager wishes to find the sales data for desktop products.
Input: Integer N. This number shows the number of product id’s considered from the sales data.
A string of the last N product id’s sold given as input.
Output: Count the number of desktop products sold.
Example:
Input: 8
ajklAeqQ
Output: 6
Logic
All the laptop product ids are taken in a list [“a”,”e”,”i”,”o”,u”,”A”,”E”,”I”,”O”,”U”].
Take the input string and loop on the string, and take each character from the string.
Each character is taken. Suppose the character is in the list of laptop ids. Do not increment the count.
Otherwise, increment the count.
Program
list1=["a","e","i","o","u","A","E","I","O","U"]
count=0
N=int(input("enter the number 0---"))
string=input("enter the last N products sold")
list2=list(string)
print(list2)
for j in list2:
if j not in list1:
count+=1
print(count)
Link for playlists:
https://www.youtube.com/channel/UCl8x4Pn9Mnh_C1fue-Yndig/playlists
Link for our website: https://learningmonkey.in
Follow us on Facebook @ https://www.facebook.com/learningmonkey
Follow us on Instagram @ https://www.instagram.com/learningmonkey1/
Follow us on Twitter @ https://twitter.com/_learningmonkey
Mail us @ [email protected]
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Product Sale Problem in Python || Lesson 21 || Python Placements || Learning Monkey ||» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.