0% found this document useful (0 votes)
3 views22 pages

Python Programs for Beginners

The document outlines a series of Python programs, each designed to perform specific tasks such as adding numbers, calculating areas, checking grades, and more. Each program is labeled with a corresponding output section, indicating the expected results of the code. The collection serves as a basic guide for beginners to understand various programming concepts in Python.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views22 pages

Python Programs for Beginners

The document outlines a series of Python programs, each designed to perform specific tasks such as adding numbers, calculating areas, checking grades, and more. Each program is labeled with a corresponding output section, indicating the expected results of the code. The collection serves as a basic guide for beginners to understand various programming concepts in Python.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HELLO WORLD PROGRAM IN PYTHON - First Python Program

PROGRAM 1

OUTPUT
Write a Python Program to Add Two Numbers
PROGRAM 2

OUTPUT
Python Program to Add Two Numbers by TAKING input
from user
PROGRAM 3

OUTPUT
Program in Python Find & Calculate Square Root
of any number
PROGRAM 4

OUTPUT
Python program to Calculate Area of Triangle
PROGRAM 5

OUTPUT
Python Program to calculate area of rectangle

PROGRAM 6

OUTPUT
Python Program to calculate perimeter of rectangle

PROGRAM 7

OUTPUT
Python Program to swap values of two variables using third variable

PROGRAM 8 OUTPUT
Python Program swap values of two variables without third
variable
PROGRAM 9 OUTPUT
Python Program to find the square of any number

PROGRAM 10

OUTPUT
Python Program to check whether a person can vote or not

PROGRAM 11

OUTPUT
Python Program to check grade of student and print result accordingly

PROGRAM 12 OUTPUT
Python Program to check whether the number is positive, negative or zero

PROGRAM 13

OUTPUT
Python Program to take input of choice of number from user and print name
of day
PROGRAM 14

OUTPUT
Python Program to take input of choice of character from user and print
color name of rainbow
PROGRAM 15

OUTPUT
Python Program to take input of choice of operator from user and print
result
PROGRAM 16

OUTPUT
Python Program to print first 10 natural numbers using while
loop

PROGRAM 17 OUTPUT
Python Program to print first 10 even numbers

PROGRAM 18 OUTPUT

Using for loop


Python Program to print odd numbers up to n number

PROGRAM 19 OUTPUT
Python Program to convert kilometers into meters

PROGRAM 20

OUTPUT
Python Program to print table of any number

PROGRAM 21 OUTPUT
Python Program to calculate Simple Interest

PROGRAM 22

OUTPUT

You might also like