0

Needs support-shipping cost practice

Imagine you need to calculate the shipping cost for customer orders based on the weight of the packages. The cost per kilogram is $5.   Task Complete the shipping_cost() function to take the weight as an argument, calculate the shipping cost based on the weight, and display it in the given format. The function call is already done.

18th Sep 2023, 8:55 AM
Elsir Nour
Elsir Nour - avatar
6 odpowiedzi
+ 2
What is the question and where is your attempt? If you post your code, I or someone else can help you.
18th Sep 2023, 9:00 AM
Keith
Keith - avatar
+ 2
That's not an attempt 🤔 The objective is to write the function. If you don't understand how functions work you should go through the lesson again. You need to return the value of 'weight * 5'. More info on functions : https://www.geeksforgeeks.org/JUMP_LINK__&&__python__&&__JUMP_LINK-functions/amp/ https://www.w3schools.com/python/python_functions.asp
18th Sep 2023, 11:03 AM
Keith
Keith - avatar
+ 1
Thanks for sharing the links
18th Sep 2023, 11:28 AM
Elsir Nour
Elsir Nour - avatar
0
Thanks for kindness
18th Sep 2023, 9:37 AM
Elsir Nour
Elsir Nour - avatar
0
Beliw is the code needs to be completed
18th Sep 2023, 9:37 AM
Elsir Nour
Elsir Nour - avatar
0
#taking the weight as input weight = int(input()) #complete the function def shipping_cost(): #function call shipping_cost(weight)
18th Sep 2023, 9:37 AM
Elsir Nour
Elsir Nour - avatar