Python Programs

Python Program to accept numbers from the user and Find the maximum and minimum element

Python Program to accept numbers and Find the maximum and minimum element of the numbers entered by the user Problem Definition: Write a Python Program to accept numbers from the user until the user enters done. Find the maximum and minimum element of the numbers entered by the user. Use class and methods concepts. Program …

Python Program to accept numbers from the user and Find the maximum and minimum element Read More »

Python Program using classes and objects to deposit and withdraw money in a Bank Account

Python Program using classes and objects to deposit and withdraw money in a Bank Account Problem Definition: Write a Python program using classes and objects to deposit and withdraw money in a Bank Account. This is just a demonstration program. Source code of Python Program using classes and objects to deposit and withdraw money in …

Python Program using classes and objects to deposit and withdraw money in a Bank Account Read More »

Python program that stores the student name, roll number, and marks in three subjects

Python program that stores the student name, roll number, and marks in three subjects Problem Definition: Write a Python program that has a class named Student that stores the student name, roll number, and marks in three subjects. Display the student information (Roll No, Name and Total Marks scored) Source code for Python program that …

Python program that stores the student name, roll number, and marks in three subjects Read More »

Python program to find the area and perimeter of a rectangle

Python program to find the area and perimeter of a rectangle Problem Definition: Write a python program that has class named Rectangle with attributes length and beadth and two methods area and perimeter they return area and perimeter respectively. Program source code for Python program to find the area and perimeter of a rectangle class …

Python program to find the area and perimeter of a rectangle Read More »

Python program to keep track of the number of employees in an organization

Python program to keep track of the number of employees in an organization Problem Description: Write a python program to keep track of the number of employees in an organization and also store and display their name, designation, and salary details. Program Description: As said in the problem definition, first create a class named Employee. …

Python program to keep track of the number of employees in an organization Read More »

Python program to store and display the student name and marks of a student

Python program to store and display the student name and marks of a student Problem Definition: Write a python program to store and display the student name and marks of a student. Use the list to store the marks of a student in three subjects. Program Description: As said in the problem definition, first create …

Python program to store and display the student name and marks of a student Read More »

List and give syntax of all python supported conditional statements

List and give syntax of all python supported conditional statements List and give syntax of all python supported conditional statements along with its usage with an example program to check whether a given number is positive or negative or zero. Solution Python support four typs of conditional statements, they are, Conditional Execution: The simplest for …

List and give syntax of all python supported conditional statements Read More »

What are the three types of errors encountered in python programs

What are the three types of errors encountered in python programs? Mention three types of errors encountered in python programs. Explain the basic building block of python with an example python program to display the format-number (Fn = 22n + 1) for an ā€˜nā€™ value prompted by the user. Solution: There are three types of …

What are the three types of errors encountered in python programs Read More »

error: Content is protected !!