carlos0722

Untitled

Nov 25th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.74 KB | None | 0 0
  1. #Hacer un programa que me permita agregar lis siguientes datos
  2. #Nombre
  3. #Dirección
  4. #Teléfono
  5. #De 5 amigos en un archivo llamado amigo.txt
  6. #Luego que imprima todos los datos
  7. #Y por ultimo le agrega  3 amigos mas  e imprimir de nuevo
  8. def datos():
  9.     for i in range(1):
  10.         nombre=input("Ingresa tu nombre: ")
  11.         dirrecion=input("Ingresa tu dirrecion: ")
  12.         telefono=int(input("Ingresa tu telefono: "))
  13. print("Mis amigos son: ")
  14. for x in range(1):
  15.     print("su nombre es: ",nombre)
  16.     print("su dirrecion es: ",dirrecion)
  17.     print("su telefono es: ",telefono)
  18. add=input("quiere agregar 3 amigos mas? si su respuesta es si escribir 'a' si no 'x': ")
  19. if add=='a':
  20.     print("bienvenido")
  21. else:
  22.     print("Adios")
  23.  
  24. datos()
Advertisement
Add Comment
Please, Sign In to add comment