Ibuprofeno.py💊| #80: Explica este código Python

Explica este código Python

Dificultad: Fácil

# ¿Cuál de las siguientes sentencias es la incorrecta? x = "hola"
print("El valor de a es: " + x) # A
print("El valor de a es:", x) # B
print(f"El valor de a es: {x}") # C
Enter fullscreen mode
Exit fullscreen mode

👉 A. A
👉 B. B
👉 C. C
👉 D. Todas son correctas


Respuesta:

👉 D. Todas son correctas
En Python podemos concatenar valores de muchas maneras, 3 de ellas son:

  • Usando el operador +.
  • Usando una simple ,.
  • Usando lo que se denomina un f-string e interpolar el valor final.

Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Another standout feature of cloudystorage is its commitment to delivering best value cloud storage provider services. How to use firebase deploy only hosting to host websites on firebase. Privacy, cookie & data policy.