Untitled

This snippet defines a function to create a customized object with specified color, height, and shape. When called, it prints the properties of the object. In this example, the color is green, the height is 3.20 meters, and the shape is rectangular.
Anonymous
python
08/26/2024 10:32 PM
304 B
24
Indexable
def gerar_objeto_personalizado(cor, *, altura, formato):
    print(f'A cor é {cor}, a altura é de {altura} metros e seu formato é {formato}')

gerar_objeto_personalizado('verde', altura = 3.20, formato = 'retangular.')
Editor is loading...
Leave a Comment