Advertisement
teslariu

template sin menu

Mar 21st, 2022
1,046
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # Ejemplo de template sin menu
  4. # Script que pide un radio y devuelve el área del círculo
  5.  
  6. while True:
  7.    
  8.     #----- inicio instrucciones del script--------
  9.    
  10.     radio = float(input("Radio del círculo: "))
  11.     print(f"Superficie: {3.1416*radio**2:.2f}")
  12.    
  13.     #------ fin de instrucciones del script--------
  14.    
  15.     opcion = input("Presione cualquier tecla para continuar (o 'x' para salir): ")
  16.     if opcion.lower() == "x":
  17.         print("Gracias por usar este programa...")
  18.         break
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement