LAB 1 - VyshnaviPerla/PYTHON GitHub Wiki

PYTHON ASSIGNMENT-1

AUTHOR :

LAKSHMI VYSHNAVI PERLA

OBJECTIVE :

To learn about the basic python topics like CONDITIONAL STATEMENTS , LOOPS , LISTS.

FEATURES :

  1. Password Validation
  2. Sentence with words and functions
  3. Triplet sum to zero
  4. Printing common and uncommon lists

CONFIGURATION :

  1. Version: Python 3.6.4
  2. Software: PYCHARM Software

INPUT/OUTPUT SCREENSHOTS:

1. For the web application password validation we have different requirements to get a valid password:

  • Password range should be between 6-16 characters
  • Password should contain a numeric value
  • Password should contain special characters
  • Password should contain a lower and uppercase characters

2. Print sentence with different functions applied on it:

  • Middle words of the sentence
  • Longest word of the sentence
  • Reversal of the sentence

3. Triplets which give sum of zero:

Here in this program an array of digits is given for which different triplets are created and their sum equals to zero. If the condition is not accepted the triplet condition is failed.

4. List of students :

  • List of students in python class.
  • List of students in web class.

  • Students attending both the classes
  • Students who are not common in both the classes

IMPLEMENTATION WITH CODE SNIPPET:

1. PASSWORD VALIDATION:-

User gives a desired password and it should meet the requirements to make it valid.

-Password range is checked with conditional statements applied to the len() function.

-Password should a numeric value using isdigit() function.

-Password should contain special characters like $,@,!,*.

-Password should contain a lower and uppercase characters.

2.PRINTING OF SENTENCE WITH FUNCTIONS:

  • split() and join() functions are used for the reversal
  • pool() and sort() functions are used for largest word
  • length of the split() is divided by 2 and those words are chosen as middle words

3.TRIPLET WITH SUM TO ZERO:

  • The array of digits are 5,4,9,8,-6,-1,-7,-2.
  • Using these the different triplet combinaations are given such that the sum of triplets is zero.

4.LISTS:

  • Two different courses student lists are given.
  • Comparison is done between the lists and common and uncommon students in the lists are found.

DEPLOYMENT:

1.PASSWORD VALIDATION:

2.SENTENCE OF WORDS WITH FUNCTION:

3.TRIPLET WITH SUM OF ZERO:

4.LISTS:

LIMITATIONS: FLOAT VALUES ARE NOT TAKEN IN TRIPLET WITH SUM OF ZERO PROGRAM.

REFERENCES: STACK OVERFLOW,GEEKFORGEEKS.