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
Examen

Python_Programming_FinalExam

Puntuación
-
Vendido
-
Páginas
4
Grado
A+
Subido en
22-07-2023
Escrito en
2022/2023

1. 1. Write a Python program “FinalE” to complete the following: • Define a class Shape (to be used as a super class) with data attributes color, filled (you may define “filled” in whatever you prefer, such as 1—filled, 0—not filled; yes—filled, no—not filled, or using True/False, …). • Define a subclass, Triangle, that extends class Shape, with 3 data attributes: side1, sisde2, side3 (for the 3 sides). • Implement methods __init__ and __str__ in both of the classes • Implement methods, area() and perimeter() for class Triangle. • Implement regular set/get methods for the data attributes. • Define regular main() function in which proper inputs should be read from keyboard (you need to use try-except for validation of the inputs—see the following sample testing) for the creation of Triangle object and display the object properties, such as the color, whether filled or not, area, perimeter. o Need to check whether the input can form a triangle (if the sum of any two sides is less than the third side, all these 3 inputs for the sides cannot form a triangle.) • Test your program and take screenshots of running your program. 2. 2. Write a Python program (its name must be “FinalE”) that reads a string and check the string to see whether it is a valid “secure code” according to the following rules: • At least two uppercase letters. • At least one lowercase letter. • It includes at least two digits, and the sum of the digits must be an odd number. • It includes at least one vowel (Vowels are the letters a, e, i, o, u and their uppercase cousins). • It includes at least one special character (i.e., @, #, $, %, &). Have your code well designed and organized: in addition to defining a main function, you would need to define at least two other functions to be called in the main function. Hints: Python string has defined many functions/methods for you to use in this project; also you may find the following function, if called, will return a list of Characters (or single-letter-strings), for example, [“h”, “e”, “l”, “l”, “o”] for “hello” useful for this project:

Mostrar más Leer menos
Institución
Python Programming
Grado
Python Programming








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

Escuela, estudio y materia

Institución
Python Programming
Grado
Python Programming

Información del documento

Subido en
22 de julio de 2023
Número de páginas
4
Escrito en
2022/2023
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$15.49
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


Documento también disponible en un lote

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.
datascience24 Self
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
84
Miembro desde
3 año
Número de seguidores
16
Documentos
159
Última venta
1 mes hace

Please message me using Send Message option for new assignment requests.

4.5

12 reseñas

5
10
4
0
3
1
2
0
1
1

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