Python Forum
What am I doing wrong? New to Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What am I doing wrong? New to Python
#6
Hold your horses gentleman.

Please read carefully:

"Given the dimensions of a brick (width, height, length in cm) and the number of bricks ordered, calculate how much plastic, in grams, is required (if a cubic centimetre weighs 7 grams)"

Then observe parameters given in function (width_brick, height_brick, length_brick, number_of_bricks) and comment about it:
# DO NOT CHANGE
# THE HEADER OF THE FUNCTION WHICH HAS BEEN PROVIDED FOR YOU
# ABOVE



Therefore this function is as simple as:

def amount_of_plastic(width_brick, height_brick, length_brick, number_of_bricks):
    return width_brick * height_brick * length_brick * number_of_bricks * 7 
EDIT: this is useful read: What is the difference between arguments and parameters?
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
RE: What am I doing wrong? New to Python - by perfringo - Jul-02-2019, 08:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 2,822 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  python gives wrong string length and wrong character thienson30 2 3,110 Oct-15-2019, 08:54 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020