dictionary in python | Lec-14
In this video, I have talked about the fundamentals of programming and Python. If you complete this, you will be well-versed in using list for different use case.
Directly connect with me at:- topmate.io/manish_kumar25
Discord channel:- / discord
For more queries reach out to me on my below social media handle.
Follow me on LinkedIn:- / manish-kumar-373b86176
Follow Me On Instagram:- / competitive_gyan1
Follow me on Facebook:- / manish12340
My Second Channel -- / @competitivegyan1
Interview series Playlist:- • Interview Questions an...
My Gear:-
Rode Mic:-- amzn.to/3RekC7a
Boya M1 Mic-- amzn.to/3uW0nnn
Wireless Mic:-- amzn.to/3TqLRhE
Tripod1 -- amzn.to/4avjyF4
Tripod2:-- amzn.to/46Y3QPu
camera1:-- amzn.to/3GIQlsE
camera2:-- amzn.to/46X190P
Pentab (Medium size):-- amzn.to/3RgMszQ (Recommended)
Pentab (Small size):-- amzn.to/3RpmIS0
Mobile:-- amzn.to/47Y8oa4 ( Aapko ye bilkul nahi lena hai)
Laptop -- amzn.to/3Ns5Okj
Mouse+keyboard combo -- amzn.to/3Ro6GYl
21-inch Monitor-- amzn.to/3TvCE7E
27-inch Monitor-- amzn.to/47QzXlA
iPad Pencil:-- amzn.to/4aiJxiG
iPad 9th Generation:-- amzn.to/470I11X
Boom Arm/Swing Arm:-- amzn.to/48eH2we
My PC Components:-
intel i7 Processor:-- amzn.to/47Svdfe
G.Skill RAM:-- amzn.to/47VFffI
Samsung SSD:-- amzn.to/3uVSE8W
WD Blue HDD:-- amzn.to/47Y91QY
RTX 3060Ti Graphic card:- amzn.to/3tdLDjn
Gigabyte Motherboard:-- amzn.to/3RFUTGl
O11 Dynamic Cabinet:-- amzn.to/4avkgSK
Liquid cooler:-- amzn.to/472S8mS
Antec Prizm FAN:-- amzn.to/48ey4Pj
Пікірлер: 32
I was about to ask for the video and here you're with another one👏🏻
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))
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)
bhai can i get the json data list which you shown as example for nested dictionary
@manish_kumar_1
Ай бұрын
Zomato resturant data from kaggle website
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)
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)
from where to download this zomato data used in this video ?
@manish_kumar_1
2 ай бұрын
Kaggle
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.
# 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
Manish can you do a video on decorators. Thanks
@manish_kumar_1
2 ай бұрын
Sure 😊
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
2 ай бұрын
Study, update resume, keep applying, Notice period is also a factor for getting calls.
@user-ft2bh2ws4i
2 ай бұрын
@@amazhobner i have 2 months of notice period. What should i do in this case ?
bhaiya next time se thoda zoom karke code ka video banaoo na.Baki Best Video
@manish_kumar_1
3 ай бұрын
Sure
Manish bhai nahi aara hai likhna.
@manish_kumar_1
Ай бұрын
It is completely fine if you are struggling to write code. Aapko dhire dhire aane lagega bas daate rahiyega
Bhai tum Kaun se application pr pen tab use karte hai
@manish_kumar_1
3 ай бұрын
Xournal++