Skip to content
Laviyx Learn

Try

B.Tech I Year II Sem

Python Programming Lab

Every week of the JNTUH R22 Python Programming lab, with the aim, algorithm, code, real output, common mistakes and viva questions.

Python38 experimentsJNTUH R22 · CS206ESUpdated

Week 1

  1. 1Explore python.org and the help() utility
  2. 2Use the Python interpreter as a calculator
  3. 3Calculate compound interest
  4. 4Distance between two points
  5. 5Read and print a person's details

Week 2

  1. 6Print a number triangle using a for loop
  2. 7Check if a character is a digit, lowercase, uppercase or special character
  3. 8Fibonacci sequence using a while loop
  4. 9Print all prime numbers in an interval

Week 3

  1. 10Convert a list and a tuple into arrays
  2. 11Find common values between two arrays
  3. 12GCD of two numbers using a function
  4. 13Check a palindrome string using a function

Week 4

  1. 14Check if a list is sorted using a function
  2. 15Check if a list has duplicates using a function
  3. 16Remove duplicates from a list using a function
  4. 17Add single-letter words and the empty string to a word list
  5. 18Invert a dictionary read from the user
  6. 19Add a comma between the characters of a word
  7. 20Remove a given word from all places in a string
  8. 21Capitalize the first letter of every word without built-in functions
  9. 22Generate all binary strings of n bits using recursion

Week 5

  1. 23Define a matrix and print it
  2. 24Addition of two square matrices
  3. 25Multiplication of two square matrices
  4. 26Create a module of geometrical shapes and use it
  5. 27Exception handling with common built-in exceptions

Week 6

  1. 28Draw rectangles, points and circles on a Canvas
  2. 29Method Resolution Order (MRO) in multiple levels of inheritance
  3. 30Validate a phone number and an email id

Week 7

  1. 31Merge two files into a third file
  2. 32Check whether given words are present in a file
  3. 33Find the most frequent word in a text file
  4. 34Count words, vowels, spaces and upper and lower case letters in a file

Week 8

  1. 35Explore NumPy, SciPy and Matplotlib
  2. 36Digital logic gates AND, OR, NOT and XOR
  3. 37Half adder, full adder and parallel adder
  4. 38GUI form with two labels, two text fields, Submit and Reset buttons

Writing your lab record

  1. Aim: one sentence saying what the program does.
  2. Algorithm: the steps in plain words, before any code.
  3. Program: the code you wrote and ran yourself.
  4. Output: the output from your own run, with your own sample input.

Use these pages to check your understanding and your output, then write the record in your own words.

Experiment list from the official JNTUH R22 B.Tech CSE syllabus (course CS206ES, pages 29–30). Laviyx Learn is not affiliated with JNTUH. Your college may add or change experiments, so check your own lab manual too.