This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Leonardo Garcìa Lòpez - 6ª "N" - Examen_Compiladores | |
| import ply.lex as lex | |
| import tkinter as tk | |
| from tkinter import ttk | |
| # Definición de tokens y palabras reservadas | |
| tokens = ( | |
| 'RESERVADO', | |
| 'IDENTIFICADOR', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def new_user(user_data): | |
| records = int(input('\n¿Cuántos usuarios desea registrar? ')) | |
| for i in range(records): | |
| print(f"\nRegistro número {i + 1}") | |
| while True: | |
| user_name = input('\nIngrese su nombre: ') | |
| if 4 <= len(user_name) < 49: | |
| break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while True: | |
| print('\nMenú') | |
| print('\nA) Nuevo Usuario') | |
| print('B) Historial de Usuarios') | |
| print('C) Información de Usuario') | |
| print('D) Editar Usuario') | |
| print('E) End') | |
| opcions = input('\nDigite la opción a realizar: ') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| records = int(input('¿Cuantos usuarios desea registrar? ')) | |
| user_counter = 1 | |
| user_ids = [] | |
| for i in range(records): | |
| print(f"\nRegistro número {i + 1}") | |
| while True: | |
| user_name = input('Ingrese su nombre: ') | |
| if 4 <= len(user_name) < 49: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| records = int(input ( '¿Cuantos usuarios desea registrar?') ) | |
| for i in range(records): | |
| print(f"\nRegistro número {i + 1}") | |
| while True : | |
| user_name = input( ( 'Ingrese su nombre: ') ) | |
| if len(user_name) >= 4 and len(user_name) < 49: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print('Hola, a continuación puede registrarse. ') | |
| first_name = input('Ingrese su nombre: ') | |
| last_name = input('Ingrese su apellido: ') | |
| age = int( input('Ingrese su edad: ') ) | |
| phone_number = int( input('Ingrese su número de telefóno: ') ) | |
| E_mail = input('Ingrese su correo electrónico: ') | |
| print('Hola ' + first_name + ' ' + 'en breve recibiras un correo a ' + E_mail) |