0% found this document useful (0 votes)
6 views2 pages

Assignment Questionss m3, m4, m5

The document outlines assignment questions for a Python Application Programming course, covering various modules. Tasks include writing programs for strong password detection, creating a Mad Libs program, and demonstrating concepts like type-based dispatch and class overloading. Additionally, it includes exercises on NumPy arrays and Pandas series, requiring students to implement specific functionalities and explain their code.

Uploaded by

pridator63
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Assignment Questionss m3, m4, m5

The document outlines assignment questions for a Python Application Programming course, covering various modules. Tasks include writing programs for strong password detection, creating a Mad Libs program, and demonstrating concepts like type-based dispatch and class overloading. Additionally, it includes exercises on NumPy arrays and Pandas series, requiring students to implement specific functionalities and explain their code.

Uploaded by

pridator63
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Faculty of Engineering &Technology (Co-Ed)

Assignment Questions
Sub:Python Application Programming SubCode:22CS44

Module-3
1a. write programs to do the following tasks.
Strong Password Detection
Write a function that uses regular expressions to make sure the password string it is
passed is strong. A strong password is defined as one that is at least eight characters
long, contains both uppercase and lowercase characters, and has at least one digit.
You may need to test the string against multiple regex patterns to validate its strength

1b. with suitable python code explain i) Reading ZIP files ii)Extracting from ZIP files
iii) creating and Adding to ZIP files

2a. Create a Mad Libs program that reads in text files and lets the user add their own
text anywhere the word ADJECTIVE, NOUN, ADVERB, or VERB appears in the text
file. For example, a text file may look like this: The ADJECTIVE panda walked to the
NOUN and then VERB. A nearby NOUN was unaffected by these events.

The program would find these occurrences and prompt the user to replace them.

Enter an adjective:
silly
Enter a noun:
chandelier
Enter a verb:
screamed
Enter a noun:
pickup truck

The following text file would then be created:


The silly panda walked to the chandelier and then screamed. A nearby pickup truck
was unaffected by these events.
2b.with a suitable python codes for each explain the concept of finding patterns of
Text with and without regular expressions.

Module-4
1a. write a python program to illustrate type-based dispatch
1b. write a python program to illustrate __init__( ) and __str__( ) also discuuss their
roles in your program.
2a. write a program to create a class Time to represent time in HH:MM:SS format.
Perform the following operations:
a. Overload + to add two time objects
b. Overload + to add a numeric value to a time object
c. Overload __str__ ( ) to display time in appropriate format.
2b.Differentiate pure functions and modifiers with suitable codes.

Module-5
1a. Create the following NumPy arrays:
a) A 1-D array called zeros having 10 elements and all the elements are set to zero.
b) A 1-D array called vowels having the elements ‘a’, ‘e’, ‘i’, ‘o’ and ‘u’.
c) A 2-D array called ones having 2 rows and 5 columns and all the elements are set
to 1 and dtype as int.
d) Use nested Python lists to create a 2-D array called myarray1 having 3 rows and 3
columns and store the following data:
2.7, -2, -19
0, 3.4, 99.9
10.6, 0, 13
e) A 2-D array called myarray2 using arange() having 3 rows and 5 columns with start
value = 4, step size 4 and dtype as float.
1b.Make use of NumPy library write a python code to illustrate operations on arrays.
2a. Demonstrate with suitable examples different ways in which a series can be
created in Pandas.
2b.list Attributes and methods of Pandas Series

You might also like