El return solo me devuelve False en este método

0 votes

En este método el return solo me está devolviendo False, ya he intentado arreglarlo pero sin llegar a nada, no sé como corregirlo

el método es el siguiente:

def aprobar_lámparas (radio_1, radio_2):

  volumen_esfera_1 = clasificar_esfera(radio_1)

  volumen_esfera_2 = clasificar_esfera(radio_2)

  clasificar_esfera_1 = clasificar_esfera (volumen_esfera_1)

  clasificar_esfera_2 = clasificar_esfera (volumen_esfera_2)

  aprobar_esferas = True

  if (clasificar_esfera_1 == 1 and clasificar_esfera_2 == 2) or (clasificar_esfera_1 == 2 and clasificar_esfera_2 == 1):

    aprobar_esferas = True

  else:

    aprobar_esferas = False

  print("aprobar_esferas:", aprobar_esferas)

  return aprobar_esferas

Oct 18 in Python by anonymous
• 120 points
33 views

1 answer to this question.

0 votes

Hola amiga como estas

La función no devuelve falso, porque no devuelve nada. Su tipo de retorno es nulo. Recibe falso como parámetro

answered Oct 19 by Gitika
• 48,320 points

Related Questions In Python

0 votes
1 answer

Return a list inside a for loop while iterating over the elements of another list

The print() is getting called multiple times ...READ MORE

answered Sep 21, 2018 in Python by SDeb
• 13,250 points
291 views
0 votes
1 answer

What does the return statement do in Python?

The print() function is use to write ...READ MORE

answered Oct 1, 2018 in Python by SDeb
• 13,250 points
386 views
0 votes
1 answer

Does Python's time.time() return the local or UTC timestamp?

The time.time() function returns the number of seconds since ...READ MORE

answered Oct 5, 2018 in Python by SDeb
• 13,250 points
192 views
0 votes
2 answers

Why do we use return statement in python?

def maximum(x, y):     if x > y:     ...READ MORE

answered Apr 4, 2019 in Python by anonymous
362 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,557 views
0 votes
0 answers
0 votes
1 answer

what is vm options ? I installed Pycharm on my pc but it shows no vm options file found . What should i do please help me to fix it

Hi, @Mushfiqkhantrial, It is important to run pycharm.sh from the bin folder. The VM ...READ MORE

answered Oct 4 in Python by Gitika
• 48,320 points
133 views
0 votes
1 answer

Please Help me About this Pygame Error installing on pip

Hi, @Micheal, Download pygame‑1.9.3‑cp37‑cp37m‑win_amd64. While if you have a 64-bit ...READ MORE

answered Oct 12 in Python by Gitika
• 48,320 points
363 views