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.
6 ответов
+ 2
What is the question and where is your attempt? If you post your code, I or someone else can help you.
+ 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
+ 1
Thanks for sharing the links
0
Thanks for kindness
0
Beliw is the code needs to be completed
0
#taking the weight as input
weight = int(input())
#complete the function
def shipping_cost():
#function call
shipping_cost(weight)