all AI news
Ibuprofeno.py💊| #81: Explica este código Python
April 15, 2024, 1 p.m. | Cristian Fernando
DEV Community dev.to
Explica este código Python
Dificultad: Fácil
print(type(float(True) + int("1")) == "int")
👉 A. True
👉 B. False
👉 C. None
👉 D. TypeError
Respuesta:
👉 B. False
Vamos por partes:
float(True) será igual a 1.0.
int("1") será igual a 1.
type(1.0 + 1) será igual a class <float>.
float es diferente de int, por ende el resultado es False.
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Software Engineer for AI Training Data (School Specific)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Python)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Tier 2)
@ G2i Inc | Remote
Data Engineer
@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania
Artificial Intelligence – Bioinformatic Expert
@ University of Texas Medical Branch | Galveston, TX
Lead Developer (AI)
@ Cere Network | San Francisco, US