MITS CODE
Home
Videos
  • Python
  • C Programing
  • Data Structures
Laboratory
  • Python
  • C Programing
  • C++
  • Java
  • Data Structures
Practice
  • Python
  • C Programing
  • Java
Events
Contact Us
MITS CODE
Home
Videos
  • Python
  • C Programing
  • Data Structures
Laboratory
  • Python
  • C Programing
  • C++
  • Java
  • Data Structures
Practice
  • Python
  • C Programing
  • Java
Events
Contact Us
More
  • Home
  • Videos
    • Python
    • C Programing
    • Data Structures
  • Laboratory
    • Python
    • C Programing
    • C++
    • Java
    • Data Structures
  • Practice
    • Python
    • C Programing
    • Java
  • Events
  • Contact Us
  • Home
  • Videos
    • Python
    • C Programing
    • Data Structures
  • Laboratory
    • Python
    • C Programing
    • C++
    • Java
    • Data Structures
  • Practice
    • Python
    • C Programing
    • Java
  • Events
  • Contact Us

20CSE101 PROGRAMMING FOR PROBLEM SOLVING (PYTHON)

OPERATORS AND EXPRESSIONS

 a) Swapping of two number with and without using temporary variable.  

Solve

 b) If the age of Ram, Sam, and Khan are input through the keyboard, write a python program to determine the  eldest and youngest of the three.  

Solve

 c) Develop a program that performs arithmetic operations (Addition, Subtraction, Multiplication, and Division)  on integers. Input the two integer values and operator for performing arithmetic operation through keyboard.  The operator codes are as follows: 

  •   For code '+', perform addition.
  •   For code '-', perform subtraction.
  •   For code '*', perform multiplication.
  •   For code '/', perform division 

Solve

 d) Implement the python program to generate the multiplication table. 

Solve

 e) Implement Python program to find sum of natural numbers .

Solve

 f) If the first name of a student is input through the keyboard, write a program to display the vowels and  consonants present in his/her name.  

Solve

g ) The marks obtained by a student in 5 different subjects are input through the keyboard. Find the average  and print the student grade as per the MITS examination policy as shown below.

   %       OBTAINED GRADE

   90 - 100 O (Outstanding)

   80 - 89   A+ (Excellent) 

  70 - 79     A (Very Good)

   60 - 69    B+ (Good)

   50 - 59    B (Above)

   45 - 49    C (Average)

   40 - 44    P (Pass)

   < 40         F (Fail) 

Solve

 h) Implement Python Script to generate prime numbers series up to N.  

Solve

 i) Given a number x, determine whether it is Armstrong number or not. Hint: For example, 371 is an Armstrong  number since 3**3 + 7**3 + 1**3 = 371. Write a program to find all Armstrong number in the range of 0 and  999. 

Solve

DATA STRUCTURES

 a) Write a Python script to

  •  create a list  
  • access elements from a list 
  • slice lists  
  • change or add elements to a list  
  • delete or remove elements from a list 

Solve

  b) Write a Python script to read the values from a list and to display largest and smallest numbers from list.  

Solve

  c) Write a Python script to compute the similarity between two lists.  

Solve

 d) Write a Python script to read set of values from a Tuple to perform various operations.  

Solve

 e) Write a Python script to perform basic dictionary operations like insert, delete and display.  

Solve

 f) Write a Python program to count the occurrence of each word in a given sentence.  

Solve

 g) Define a dictionary named population that contains the following data.

        Keys                   Values   

    Shanghai                  17.8   

    Istanbul                    13.3  

    Karachi                     13.0   

    Mumbai                    12.5  

Solve

 h) Write a Python script to create Telephone Directory using dictionary and list to perform basic functions  such as Add entry, Search, Delete entry, Update entry, View and Exit.  

Solve

i) Implement Python script to display power of given numbers using function.  

Solve

 j) Implement a Python program that takes a list of words and returns the length of the longest one using  function. 

Solve

String Handling -Modules

a) Implement Python program to perform various operations on string using string libraries. 

Solve

b) Implement Python program to remove punctuations from a given string. 

Solve

c) Write a Python program to change the case of the given string (convert the string from lower case to upper  case). If the entered string is “computer”, your program should output “COMPUTER” without using library  functions.  

Solve

d) Implement Python program to capitalize each word in a string. For example, the entered sentence “god  helps only people who work hard” to be converted as “God Helps Only People Who Work Hard”  

Solve

 e) Write a Python script to display file contents.  

Solve

 f) Write a Python script to copy file contents from one file to another.  

Solve

 g) Write a Python script to combine two text files contents and print the number of lines, sentences, words,  characters and file size.  

Solve

 h) Write a Python commands to perform the following directory operations.   

  • List Directories and Files  
  • Making a New Directory   
  • Renaming a Directory or a File   
  • Removing Directory or File 

Solve

Copyright © 2023 MITS CODE - All Rights Reserved.

  • Events

Created by -Sine Nitish , M Sangeetha

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

Accept