Advertisement
teslariu

resueltos

Mar 14th, 2022
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. """
  5. Pedir una temperatura por pantalla (en ºC) y mostrarla en ºF.
  6. Investigar como convertirla
  7.  
  8.     ºF = ºC * 1.8 + 32
  9. """
  10.  
  11. temp = int(input("Ingrese una temperatura en ºC: "))
  12.  
  13. print(f"{temp}ºC equivalen a {temp * 1.8 + 32}ºF")
  14.  
  15. """
  16. 2) Pedir un nombre de usuario (por ejemplo, juan lopez), un server
  17. (gmail.com) y mostrar su cuenta de email (juanlopez@gmail.com)
  18. PISTA: pedir nombre y apellido por separado
  19. """
  20. nombre = input("Ingrese el nombre: ")
  21. apellido = input("Ingrese el apellido: ")
  22. server = input("Ingrese el servidor: ")
  23. email =  f"{nombre}.{apellido}@{server}.com"
  24.  
  25. print(f"Su cuenta de email es {email}")
  26.  
  27. """
  28. 3) Pedir tres numeros por pantalla y calcular su promedio
  29. """
  30. a = int(input("Ingrese un nro: "))
  31. b = int(input("Ingrese un nro: "))
  32. c = int(input("Ingrese un nro: "))
  33. print(f"Promedio: {(a+b+c) / 3}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement