Introduction to python
Collection in Python
Object Oriented python
Python With MYSQL And Excel
Python GUI
Programs in Python
- Swap two number
- Calculate the area
- Even Odd or Zero
- Largest ,Middle and Smallest Number
- Calculate Telephone Bill
- Print Table of The given Number
- Factorial of the number
- Reverse and check number is palindrome
- check number is prime , armstrong
- Program to Print the given patterns
- Guess A Number Game using Random
While Loop in Python
Loop is used to repeat the iterations upto the given condition is true.
While loop is shown here to display the numbers from 1 to 100
i=1
while i<=100:
print(i)
i=i+1
Output:
1 2 3………………………………………100
Neting of the loop can also be done
Following program prints the table of all numbers 1-5 in this case
n=1
while n<=5:
i=1
print("table for ",n)
while i<=10:
print(n*i, end=" ")
i=i+1
n=n+1
print() # to come to next line after table print
break statement may be used to explicitly break the loop .
By using break the loops breaks even if the loop condition is true.
Program to find prime number can be implemented for break statement.
n=int(input("enter the number to check"))
i=2
flag=0
while i<n:
if n%i==0:
flag=1
break
i=i+1
if flag==0:
print("number is prime")
else:
print("number is not prime")
Click Here
Tutorials
C is a very powerful and widely used language. It is used in many scientific programming situations. It forms (or is the basis for) the core of the modern languages Java and C++. It allows you access to the bare bones of your computer.C++ is used for operating systems, games, embedded software, autonomous cars and medical technology, as well as many other applications. Don't forget to visit this section...
Video/ C Introduction
Watch video in full size