100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Otro

COS2614 Assignment 1 Year 2023 Solutions + Output + Explaination

Puntuación
-
Vendido
-
Páginas
6
Subido en
08-06-2023
Escrito en
2022/2023

Complete Solutions to COS2614 Assignment 1 for the year 2023. Includes Code, Output of run-time, and Explaination.

Institución
Grado








Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
8 de junio de 2023
Número de páginas
6
Escrito en
2022/2023
Tipo
Otro
Personaje
Desconocido

Temas

Vista previa del contenido

Question 1:

Output:




Explaination:
1. The program starts by importing the necessary modules from PyQt5 for creating the GUI.

2. The generate_username function takes the full name as input and splits it into separate first
name and surname components.

3. If the surname has four or more characters, the username is created by taking the first four
characters of the surname and appending the first character of the first name.

4. If the surname has fewer than four characters, the username is created by combining the entire
surname with as many characters as needed from the first name to reach a total length of five
characters.

5. If the resulting username is less than five characters, it appends the required number of zeros
to reach a length of five characters.

6. The generate_password function takes the full name as input, removes any spaces, and
randomly selects five characters from the remaining characters to create the password.

7. The main part of the code creates a Qt application and prompts the user to enter their full
name using a QInputDialog.

8. The entered full name is used to generate the username and password by calling the respective
functions.

9. The generated username and password are displayed in a QMessageBox as an information
message.

10. When the program is run, it displays a dialog for the user to enter their full name. After
entering the name and clicking OK, a message box appears showing the generated username
and password.
5,29 €
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Learn2Progress Learn2Progress
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
75
Miembro desde
3 año
Número de seguidores
63
Documentos
15
Última venta
1 año hace

4,6

5 reseñas

5
4
4
0
3
1
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes