Download the Guru IA app

Android and iOS

Foto de perfil

Anderson

SENT BY THE APP
Estudos Gerais04/29/2025

PY 1 def rect(d1, d2): 2 area = d1 * d2 3 perimeter = 2 * d...

PY

1 def rect(d1, d2): 2 area = d1 * d2 3 perimeter = 2 * d1 + 2 * d2 4 return area, perimeter 5 6 x, y = rect("five") 7 print("Area:", x) 8 print("Perimeter:", y)

Clique para Editar

Reiniciar código

OUTPUT

Traceback (most recent call last): File "./Playground/file0.py", line 6, in <module> x, y = rect("five") TypeError: rect() missing 1 required positional argumen

PY

1 def rect(d1, d2):
2 area = d1 * d2
3 perimeter = 2 * d1 + 2 * d2
4 return area, perimeter
5
6 x, y = rect("five")
7 print("Area:", x)
8 print("Perimeter:", y)

Clique para Editar

Reiniciar código

OUTPUT

Traceback (most recent call last):
File "./Playground/file0.py", line 6, in <module>
x, y = rect("five")
TypeError: rect() missing 1 required positional argumen
Send your questions through the App
Equipe Meu Guru

Do you prefer an expert tutor to solve your activity?

  • Receive your completed work by the deadline
  • Chat with the tutor.
  • 7-day error guarantee