Task 15 You have been hired as an app developer for the company. The company plans to make an app for a grocery store where the user can order groceries and see the total amount to be paid in the cart section. To build this feature, you have to write a function that takes 2 arguments. They are: • order_items (must be a list) • location (default value should be set to "Dhanmondi") Your first task is to take a list of items from the user. Pass the list into the function parameter along with the optional location (Use default argument technique). (Also, no need to take location as input, pass this any value you want.) Your second task is to implement the function. In the function, create a dictionary for the items shown in the table. Calculate the total price of the items passed as a list to the function. Additionally, add a delivery fee of 30 taka if the location is Dhanmondi. Otherwise, add a delivery fee of 70 taka. Finally, return the value and print it. Item Price(Tk) Rice 105 Potato 20 Chicken 250 Beef 510 Oil 85 Hint: The keys are the items and values are the corresponding price. Iterate the items in the list and check if the items in the list are available in the dictionary keys or not. If it is avallable, add the price. ======

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Downloads/
assum_sec X
+
English
localhost:8888/notebooks/Downloads/21201491_Nuzhat%20Tabassum_sec-17_CSE110_assignment-06.ipynb
Cjupyter 21201491_Nuzhat Tabassum_sec-17_CSE110_assignment-06 Last Checkpoint: 8 hours ago (unsaved changes)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
+
• Run
с
Markdown
Hint: The keys are the items and values are the corresponding price. Iterate the items in the list and check if the items in the list are available in the dictionary
keys or not. If it is available, add the price.
Example1:
function_name(["Rice", "Beef", "Rice"], "Mohakhali")
total = 105 + 510 + 105 = 720 (Take the price of each item and add them.)
total = 720 + 70 = 790 (Finally, add the delivery fee based on the location.)
Input:
["Rice", "Beef", "Rice"]
Function Call:
function_name(["Rice", "Beef", "Rice"], "Mohakhali")
Output:
790
====
ニニ==ニニ===
Example2:
function_name(["Rice", "Beef", "Rice"])
total = 105 + 510 + 105 = 720 (Take the price of each item and add them.)
total = 720 + 30 = 750 (Since no location is passed in the parameter, it will use the default location-"Dhanmondi". For dhanmondi, delivery fee of 30 taka)
Input:
["Rice", "Beef", "Rice"]
* Dropbox
Function Call:
function_name(["Rice", "Beef", "Rice"])
Output:
Screenshot Added
A screenshot was added to your
Dropbox.
750
10:46 PM
12/17/2021
()
Transcribed Image Text:Downloads/ assum_sec X + English localhost:8888/notebooks/Downloads/21201491_Nuzhat%20Tabassum_sec-17_CSE110_assignment-06.ipynb Cjupyter 21201491_Nuzhat Tabassum_sec-17_CSE110_assignment-06 Last Checkpoint: 8 hours ago (unsaved changes) Logout File Edit View Insert Cell Kernel Widgets Help Trusted Python 3 O + • Run с Markdown Hint: The keys are the items and values are the corresponding price. Iterate the items in the list and check if the items in the list are available in the dictionary keys or not. If it is available, add the price. Example1: function_name(["Rice", "Beef", "Rice"], "Mohakhali") total = 105 + 510 + 105 = 720 (Take the price of each item and add them.) total = 720 + 70 = 790 (Finally, add the delivery fee based on the location.) Input: ["Rice", "Beef", "Rice"] Function Call: function_name(["Rice", "Beef", "Rice"], "Mohakhali") Output: 790 ==== ニニ==ニニ=== Example2: function_name(["Rice", "Beef", "Rice"]) total = 105 + 510 + 105 = 720 (Take the price of each item and add them.) total = 720 + 30 = 750 (Since no location is passed in the parameter, it will use the default location-"Dhanmondi". For dhanmondi, delivery fee of 30 taka) Input: ["Rice", "Beef", "Rice"] * Dropbox Function Call: function_name(["Rice", "Beef", "Rice"]) Output: Screenshot Added A screenshot was added to your Dropbox. 750 10:46 PM 12/17/2021 ()
Downloads/
assum_sec X
+
English
localhost:8888/notebooks/Downloads/21201491_Nuzhat%20Tabassum_sec-17_CSE110_assignment-06.ipynb
C jupyter 21201491_Nuzhat Tabassum_sec-17_CSE110_assignment-06 Last Checkpoint: 8 hours ago (unsaved changes)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
+
• Run
с
Markdown
Task 15
You have been hired as an app developer for the company. The company plans to make an app for a grocery store where the user can order groceries and
see the total amount to be paid in the cart section.
To build this feature, you have to write a function that takes 2 arguments. They are:
order_items (must be a list)
• location (default value should be set to "Dhanmondi")
Your first task is to take a list of items from the user. Pass the list into the function parameter along with the optional location (Use default argument technique).
(Also, no need to take location as input, pass this any value you want.)
Your second task is to implement the function. In the function, create a dictionary for the items shown in the table. Calculate the total price of the items passed
as a list to the function. Additionally, add a delivery fee of 30 taka if the location is Dhanmondi. Otherwise, add a delivery fee of 70 taka. Finally, return the
value and print it.
Item Price(Tk)
Rice
105
Potato
20
Chicken
250
Beef
510
Oil
85
======%3D
Hint: The keys are the items and values are the corresponding price. Iterate the items in the list and check if the items in the list are available in the dictionary
keys or not. If it is available, add the price.
=======
=======
Example1:
10:45 PM
12/17/2021
()
Transcribed Image Text:Downloads/ assum_sec X + English localhost:8888/notebooks/Downloads/21201491_Nuzhat%20Tabassum_sec-17_CSE110_assignment-06.ipynb C jupyter 21201491_Nuzhat Tabassum_sec-17_CSE110_assignment-06 Last Checkpoint: 8 hours ago (unsaved changes) Logout File Edit View Insert Cell Kernel Widgets Help Trusted Python 3 O + • Run с Markdown Task 15 You have been hired as an app developer for the company. The company plans to make an app for a grocery store where the user can order groceries and see the total amount to be paid in the cart section. To build this feature, you have to write a function that takes 2 arguments. They are: order_items (must be a list) • location (default value should be set to "Dhanmondi") Your first task is to take a list of items from the user. Pass the list into the function parameter along with the optional location (Use default argument technique). (Also, no need to take location as input, pass this any value you want.) Your second task is to implement the function. In the function, create a dictionary for the items shown in the table. Calculate the total price of the items passed as a list to the function. Additionally, add a delivery fee of 30 taka if the location is Dhanmondi. Otherwise, add a delivery fee of 70 taka. Finally, return the value and print it. Item Price(Tk) Rice 105 Potato 20 Chicken 250 Beef 510 Oil 85 ======%3D Hint: The keys are the items and values are the corresponding price. Iterate the items in the list and check if the items in the list are available in the dictionary keys or not. If it is available, add the price. ======= ======= Example1: 10:45 PM 12/17/2021 ()
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY