basic python program

Read Two Numbers and Print Their Quotient and Remainder in python

In this Basic Python Program, we will have a look at how read Two Numbers and Print Their Quotient and Remainder in python. Python program to read Two Numbers and Print Their Quotient and Remainder a=int(input(“Enter the first number: “)) b=int(input(“Enter the second number: “)) quotient=a//b remainder=a%b print(“Quotient is:”,quotient) print(“Remainder is:”,remainder) Output: Enter the first …

Read Two Numbers and Print Their Quotient and Remainder in python Read More »

Print all Numbers in a Range Divisible by a Given Number in python

In this Basic Python Program, we will have a look at how to print all Numbers in a Range Divisible by a Given Number in python. Python program to Print all Numbers in a Range Divisible by a Given Number in python lower=int(input(“Please enter lower range limit:”)) upper=int(input(“Please enter upper range limit:”)) n=int(input(“Enter the number …

Print all Numbers in a Range Divisible by a Given Number in python Read More »

Input The Marks of 5 Subjects and Display the Grade in python

In this python program, we will display the grade in python. User need to input the grades on 5 subject. Python program to Input The Marks of 5 Subjects and Display the Grade sub1=int(input(“Enter first subject’s marks: “))sub2=int(input(“Enter second subject’s marks: “))sub3=int(input(“Enter third subject’s marks: “))sub4=int(input(“Enter fourth subject’s marks: “))sub5=int(input(“Enter fifth subject’s marks: “))avg=(sub1+sub2+sub3+sub4+sub4)/5if(avg>=95):print(“Grade: A”)elif(avg>=80&avg<90): …

Input The Marks of 5 Subjects and Display the Grade in python Read More »

Reverse Number In Python

In this python program, we will have look at how to reverse number in python. Python program to reverse a number Number = int(input(“Enter a number: “))     Reverse = 0     while(Number > 0):         Reminder = Number %10         Reverse = (Reverse *10) + Reminder         Number = Number //10           print(“\n Reverse of entered number is = %d” %Reverse)   

Read a Number n and Compute n+nn+nnn in Python

In this Python program, we will have a look at how to read a number n & compute n+nn+nnn in python. Python Program To Read a Number n and Compute n+nn+nnn in Python n=int(input(“Please enter a number n: “)) temp=str(n) a1=temp+temp a2=temp+temp+temp comp=n+int(a1)+int(a2) print(“The value is:”,comp) Output: Pease enter a number n: 5The value is: …

Read a Number n and Compute n+nn+nnn in Python Read More »

Exchange the Values of Two Numbers Without Using a Temporary Variable in Python

In this Python program, we will have a look at how to exchange the values of two numbers without using a temporary variable in python. Python Program To Exchange The Values Of Two Numbers Without Using a Temporary Variable in Python a=int(input(“Please enter value of first variable: “)) b=int(input(“Please enter value of second variable: “)) …

Exchange the Values of Two Numbers Without Using a Temporary Variable in Python Read More »

Calculate the Average of Numbers in a Given List In Python

In this Basic Python Program,  we will Calculate the Average of Numbers in a Given List. Average of Numbers= Sum of numbers/total; Python Program To Calculate the Average of Numbers in a Given List n=int(input(“Please enter the number of elements to be inserted: “)) a=[] for i in range(0,n):    elem=int(input(“Enter element: “))    a.append(elem) avg=sum(a)/n print(“Average of …

Calculate the Average of Numbers in a Given List In Python Read More »

Basic Python Programs

Basic Python programs are designed for the Beginner in Python Programming Language. The syntax of the Python language is very clean and short compared to other programming languages. It’s really fun to work in Python because it allows you to think about the problem rather than focusing on the syntax. Basic Python Programs Hello World …

Basic Python Programs Read More »