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
This course will be delivered face to face. Tag archives : fight club 1999 youtube. Dwalls single bed.