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. ======
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...
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
()](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4dcc2abb-a507-418a-be49-4fdd396c1b0f%2F3a4296e0-2772-4b6b-9523-c90da1a08da2%2Frelr53o_processed.png&w=3840&q=75)
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
()](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4dcc2abb-a507-418a-be49-4fdd396c1b0f%2F3a4296e0-2772-4b6b-9523-c90da1a08da2%2Fnkgbrs_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY