Тёмный
No video :(

dictionary in python | Lec-14 

MANISH KUMAR
Подписаться 21 тыс.
Просмотров 1,9 тыс.
50% 1

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@abhijeetsinghbatra8143
@abhijeetsinghbatra8143 11 дней назад
x = {'A': 10, 'B': 20, 'C': 20} abs = {'A':2,'B':3} tot={} total=50 for key,value in x.items(): if key in abs: days = total-abs[key] tot[key] = days*x[key] else: tot[key]=total*x[key] print(tot)
@dnyaneshwarrautray5175
@dnyaneshwarrautray5175 21 день назад
manish can u make vdo for interview question for 2 year experience in data engineer
@hritikapal683
@hritikapal683 4 месяца назад
I was about to ask for the video and here you're with another one👏🏻
@chethan248
@chethan248 2 месяца назад
totalCost = [] for i in labour: if i == "Mahesh": Cost = 47 * labour["Mahesh"] elif i == "Sumesh": Cost = 43 * labour["Sumesh"] else: Cost = 50 * labour[i] totalCost.append(Cost) print(sum(totalCost))
@laxmanprajapati3945
@laxmanprajapati3945 14 дней назад
labour_cost = {"Mahesh": 500, "Ramesh": 400 , "Mithilesh": 400, "Suresh": 300, "Jagmohan": 1000, "Rampyare": 800} total_working_day = 50 labour_absent_day = {"Mahesh": 3,'Jagmohan' : 7} total_bill = {} for key1,value1 in labour_cost.items(): for key2,value2 in labour_absent_day.items(): if key1 == key2: total_bill[key2] = (total_working_day - value2) * value1 break else: total_bill[key1] = total_working_day * value1 print("Total Labour Cost:",sum(total_bill.values())) print("Individual Cost:") for key in total_bill: print(key,total_bill[key])
@JokesFunMasti
@JokesFunMasti Месяц назад
l_w_cost={"mahesh":500,"Ramesh":400,"Mithilesh":400,"Jagmohan":1000,"Rampyare":800} total_cost=0 for i in range(0,50): for j in l_w_cost: total_cost=total_cost+l_w_cost[j] print(total_cost) #sub Jagmohan for 7 days for i in range(0,7): total_cost=total_cost-l_w_cost["Jagmohan"] print(total_cost) #sub Mahesh for 3 days for i in range(0,3): total_cost=total_cost-l_w_cost["Ramesh"] print(total_cost) 155000 148000 146800
@abhinavsingh2894
@abhinavsingh2894 2 месяца назад
labour_with_cost = {'Mahesh': 500, 'Ramesh': 400, 'Mithilesh': 400, 'Sumesh': 300, 'Jagmohan': 1000, 'Rampyare': 800} days_labour_worked = [47,50,50,50,43,50] price_list = [] for i in labour_with_cost.values(): price_list.append(i) total_cost = 0 for i in range(min(len(days_labour_worked),len(price_list))): total_cost += days_labour_worked[i]*price_list[i] print(total_cost)
@gagandeepks
@gagandeepks 4 месяца назад
Hi Manish, my solution: labour_with_cost = {"Mahesh":500,"Ramesh":400,"Mithlesh":400,"Sumesh":300,"Jagmohan":1000,"Ram":800} # print(labour_with_cost) labour_absent = {"Mahesh":3,"Jagmohan":7} for name in labour_absent: labour_absent[name] = -labour_absent[name] * labour_with_cost[name] print(labour_absent) Total_days = 50 for name in labour_with_cost: labour_with_cost[name] = labour_with_cost[name] * Total_days print(labour_with_cost) print(f"Total labour cost is {sum(labour_with_cost.values())+sum(labour_absent.values())}") Pls reply if we have better solution, Thanks.
@safiadawood5637
@safiadawood5637 4 месяца назад
hours_worked = 50 total = 0 labour_with_cost = {"Mahesh":500, "Ramesh":400, "Mithilesh":400, "Sumesh":300, "Jagmohan":1000, "Rampyare":800} hours_absent = {"Mahesh":3, "Jagmohan":7} for k in labour_with_cost: if k in hours_absent.keys(): total += labour_with_cost[k] * (hours_worked - hours_absent[k]) else: total += labour_with_cost[k]* hours_worked print(total)
@user-ru2fy8nx1z
@user-ru2fy8nx1z 4 месяца назад
My Solution of the Assignment labour_with_cost={"Mahesh":500,"Ramesh":400,"Mithilesh":400,"Samesh":300,"Jagmohan":1000,"Rampyare":800} total=(labour_with_cost["Mahesh"])*47+labour_with_cost["Ramesh"]*50+labour_with_cost["Mithilesh"]*50+labour_with_cost["Samesh"]*50+(labour_with_cost["Jagmohan"])*43+labour_with_cost["Rampyare"]*50 print("Total Labour_cost",total)
@user-ft2bh2ws4i
@user-ft2bh2ws4i 4 месяца назад
Manish Bhai, i am also working in Reliance Jio at RCP Ghansoli. I want to switch into data side roles but not getting calls. Please make a video on how to get data engineering interview calls. I am very very frustrated with my current job.
@amazhobner
@amazhobner 4 месяца назад
Study, update resume, keep applying, Notice period is also a factor for getting calls.
@user-ft2bh2ws4i
@user-ft2bh2ws4i 4 месяца назад
@@amazhobner i have 2 months of notice period. What should i do in this case ?
@mithleshbarnwal9031
@mithleshbarnwal9031 3 месяца назад
bhai can i get the json data list which you shown as example for nested dictionary
@manish_kumar_1
@manish_kumar_1 3 месяца назад
Zomato resturant data from kaggle website
@AmitGupta-mu9uv
@AmitGupta-mu9uv 3 месяца назад
# Assignment - Total Labour cost if the total working days was 50 out of which Mahesh was absent for 3 days and Jagmohan was abesnt for 7 days. Find out the total labour cost. #I have tried this out without using for loop labourer_with_cost= {"Mahesh":500,"Ramesh":400,"Mithlesh":400,"Sumesh":300} print(labourer_with_cost) labourer_with_cost["Jagmohan"]=1000 labourer_with_cost["Rampyare"]=800 print(labourer_with_cost) print(" A: Total Labour cost for a day: ",sum(labourer_with_cost.values())) print(" B: Total Labour cost for 50 day: ",50*sum(labourer_with_cost.values())) print(" C: Total labour cost for Mahesh for 3 days: ",3*labourer_with_cost['Mahesh']) print(" D: Total labour cost for Rampyare for 7 days: ", 7*labourer_with_cost['Jagmohan']) print("Total Labour cost if the total working days was 50 and Mahesh and Jagmohan was absent for 3 and 7 Days respectively would be A*50 which is B minus (C + D) : ",50*sum(labourer_with_cost.values())- 3*labourer_with_cost['Mahesh'] - 7*labourer_with_cost['Jagmohan']) Output - {'Mahesh': 500, 'Ramesh': 400, 'Mithlesh': 400, 'Sumesh': 300} {'Mahesh': 500, 'Ramesh': 400, 'Mithlesh': 400, 'Sumesh': 300, 'Jagmohan': 1000, 'Rampyare': 800} A: Total Labour cost for a day: 3400 B: Total Labour cost for 50 days: 170000 C: Total labour cost for Mahesh for 3 days: 1500 D: Total labour cost for Rampyare for 7 days: 7000 Total Labour cost if the total working days was 50 and Mahesh and Jagmohan was absent for 3 and 7 Days respectively would be A*50 which is B minus (C + D) : 161500
@jigsparikh7961
@jigsparikh7961 4 месяца назад
Manish can you do a video on decorators. Thanks
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Sure 😊
@rohan5111
@rohan5111 4 месяца назад
from where to download this zomato data used in this video ?
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Kaggle
@manangupta4444
@manangupta4444 4 месяца назад
bhaiya next time se thoda zoom karke code ka video banaoo na.Baki Best Video
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Sure
@sonurohini6764
@sonurohini6764 3 месяца назад
Manish bhai nahi aara hai likhna.
@manish_kumar_1
@manish_kumar_1 3 месяца назад
It is completely fine if you are struggling to write code. Aapko dhire dhire aane lagega bas daate rahiyega
@vishvajitraodotcom
@vishvajitraodotcom 4 месяца назад
Bhai tum Kaun se application pr pen tab use karte hai
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Xournal++