Lab 1 Wiki - KranthiKumarGangineni/Python GitHub Wiki

Professor: Yug Yung Lee

                                              Team 11

Team Member 1:

Name: Kranthi Kumar Gangineni

Mail Id: [email protected]

Class Id : 7

Team Member 2:

Name : Polareddy Venkata Bhavesh Reddy

Mail Id: [email protected]

Class Id : 26

Task 1 : Password Validations

We are using 're' import (Regular Expressions) to complete this Task.

Code Snippet:

Case 1 : Password Length is Invalid

Case 2 : Number Validation

Case 3 : Special Characters Validation

Case 4 : UpperCase Letters Validation

Case 5 : LowerCase Letters Validation

Case 6 : All Validations Correct

Task 2: Sentence Middle, Highest, Reverse Order

Code Snippet

All the Explanation is given as comments in the code.

Input and Output

Task 3 : Find Triplets that gives Sum as 0

Code Snippet

We will be have 3 different 'for' loops, which will be iterating and tries to add different combination of Triplets. In the code, say n=7 Now --> 1st loop will be iterated from 0 to 4 index of the array and 2nd loop will start from index 1 and 3rd loop will start from index 2 and so and all the combinations of triplets will be covered in this case.

Output (Triplets Exist)

Output (No Triplets Exist)

Task 4 : Common and Not Common Students from 2 different classes.

Code Snippet:

We will be asking for Input students list for different courses i.e. Web and Python. Using Intersection and XOR operators we will be fetching the common and not common students list as shown in Output below.

Output

Task 5 : Management System

Code Snippets

Output:

Task 6 : Get most frequent item in Vector List

Code Snippet

Explanation of the code is given as comments in the code.

Output