teslariu

plantilla

Oct 26th, 2021
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. #  plantilla general para un script SIN MENU
  5. #  
  6. while True:
  7.    
  8.     #######################
  9.    
  10.     a = int(input("Ingrese un entero: "))
  11.     b = int(input("Ingrese otro entero: "))
  12.     print(f"La suma de {a} y {b} es {a+b}")
  13.    
  14.     #######################
  15.    
  16.     opcion = input("Presione cualquier tecla (o '1' para salir): ")
  17.     if opcion == "1":
  18.         print("Gracias por usar este programa...")
  19.         break
  20.    
Advertisement
Add Comment
Please, Sign In to add comment