Python program to find sum of all odd numbers between 1 to 10
Python program to find sum of all odd numbers between 1 to 10 In this example, we will learn how to calculate the sum of all odd numbers between 1 to 10. n = 0for i in range(1,11) if(…
Python program to find sum of all odd numbers between 1 to 10 In this example, we will learn how to calculate the sum of all odd numbers between 1 to 10. n = 0for i in range(1,11) if(…
Python program to find sum of all even numbers between 1 to 10 In this example, we will learn how to calculate the addition of all even numbers from 1 to 10. #python program to find sum of all even…
Python program to calculate sum of n natural numbers In this example we will learn how to calculate sum of n natural numbers 1. Python program for sum of n numbers using While Loop #Python program to calculate the addition of…
Python program to check prime number In this example, we will learn how to check if a number is a prime number. A Prime number is greater than 1 and should not be another factor except 1 and the number…
Loops in python In Python, there are two types of Loops 1. For Loop The For Loops are used to traverse an array, list, or string. Hence it is used for sequential traversing. For Loop is used in Python is…
Python program to find the largest among three numbers In this example, we will learn how to find the largest among three numbers. For this first of all we will take three numbers and then with the help of if–elif–else ladder…
Python program to check leap year In this example, we will learn how to check whether a given year is a leap. So first of all we have to know which year is a leap year A leap year is…
Python program to check if a number is positive negative or zero In this example we will learn How to check wether a number is positive negative or zero for this we will use if-elif-else statements. n= int( input( ‘…
Python program to check if a number is odd or even In this example, we will learn how to check if a number is odd or even If a number is completely divisible by 2 then the number will be…
Python program to find largest of 2 numbers In this example, we will learn how to find the largest number in two given numbers. for this we use decision-making statements if-else. num1 = int(input(‘Enter any number: ‘))num2 = int(input(‘Enter any…