Hi, welcome back, asked by the media students.
Serious in this lecture, we will discuss two of the requests or questions of our README students.
The first question, right, a program that has a Dictionary of POCs name as KS and their prize as values,
then Brent is the items in the dictionary and assorted orders and prompt the user to enter a name and
check if it is present in the dictionary.
If the name doesn't exist, then ask the user to enter pride and detail in the dictionary.
So let's begin to conclude our program.
Firstly, we will create a dictionary called Batak, which will has or contain book names as gays and
prizes as values, both equal in curly bracket between two parentheses.
We will add the name.
The book names a column five comma B between two parentheses column 10.
Comma between two.
Parentheses C, column 15.
Comma between two parentheses D column to any comma between two parentheses E colon twenty five.
Then we ask the user to enter the name of the book he wants.
So name equal aimbot between two bracket two parentheses and at between two.
But the two parentheses.
You want the book named Space close the second parentheses then if the name of the book is in vogue
DECT so program will birth control flow and will form the next print orders if the name and book underscore
dect dot case method best and if the name of the book isn't invoked so the program will ask for the
price of the the user want else price equal aimbot between two brackets and two parentheses.
What is the price of the book you want and leave space and leave his base before you close the second
parenthesis.
Then the program will add the name and the price of the scifi book by the user into pocket book between
two brackets name Equal Price Finalist.
The book will print book after adding the new book by the user's brain between two them bracket print
in brackets sort of in bracket polka dot items.
Items may close the second bracket, then close the first black.
So let's try to run this program.
The program asking me you want the book named AI so it will print the item we enter in the first so
it will print the dictionary items.
Let's start kernel and clear output.
Yes, and run it again at.
Asking me about the name of the book so I will add Z, which is not an architect, so the program will
ask for the price of the book that I want.
I will add 30 35 since the program finally branched out after adding the last item case and values,
which is Z and thirty five.
The second program we will discuss in this lecture or this video.
Consider a scenario where our son is five ice cream every day.
The price of ice cream is different.
His mother pays the bill to the ice cream vendor at the end of every week.
Right.
I buy some programs that can generate the best for the ice cream and send to his mother.
Firstly, we will create the ice cream class, which contain two attributes daily ice cream and price
class ice cream.
D.F. underscore, underscore and underscore underscore, which is that any method for open bracket itself
and daily ice cream and price bracket and column self-doubt.
Daily ice cream ekwall daily ice cream, self-doubt price, equal price.
We will create another method to calculate the total price of every type of the ice cream.
The total price itself then returns the daily ice cream multiplied by itself, the price.
Suppose we have the quantity and the price of three types of the ice cream.
Ice cream one, equal ice cream three and the five that eat in every day.
And five is about ice ice cream to equal ice cream.
One and seven ice cream three, equal ice cream, one and nine.
Then we will print this object, not total price and end the brain function on the to order in the right
order.
We will collect them.
As you see, after we run this school, we will get thirty one, which is the total cost of the prices
of the ice cream consumed by this kid.
But if we want to calculate the total price of the ice cream that gets consumed and in one week we will
add multiply by seven to the total price to be G.F. total.
But I self return self-doubt daily ice cream multiplied by self-doubt price multiply by seven and run
this good.
We will get two hundred and seventeen dollars.
Thanks for watching.
I hope you get all of that.
See you next with you.