Skip to content
Advertisement

Tag: difference

What is the difference between function and keyword/statements?

I’ve seen ‘del’ being referred to as a keyword and as a statement. Apparently, it is not considered a function: Python has a del statement (keyword) to delete objects, not a del function. https://tutorial.eyehunts.com/python/del-function-in-python-code/ I looked up the definition of a function in Python and it says: In Python, a function is a group of related statements that performs a

how can I fix this program so it won’t return ‘unknown’ for negative input (boiling_point)

Here’s the given for the problem I’m trying to solve: *python Write a function that given a mapping from material to boiling points, and a boiling point temperature, will return : the material corresponding to the boiling, if it is within 5% difference ‘UNKNOWN’ otherwise Function signature should look like : boiling_material(boiling_map, boiling_point) An example boiling_map : Given input :

Advertisement