Академический Документы
Профессиональный Документы
Культура Документы
Python is a widely used general-purpose, high level programming language. It was initially
designed by Guido Van Rossum in 1991 and developed by Python Software Foundation. It
was mainly developed for emphasis on code readability, and its syntax allows programmers
to express concepts in fewer lines of code.
Python is a programming language that lets you work quickly and integrate systems more
efficiently.
There are two major Python versions- Python 2 and Python 3. Both are quite different.
Keywords in Python: Python language also reserves some of keywords that convey
special meaning. Knowledge of these is necessary part of learning this language. Below is list
of keywords registered by python .
Data Types:
Numeric data types
a. Integer
b. Float
c. Complex
Strings
List
Tuples
Sets
Dictionary
Arrays
Name Year
……............................................. …......................................
Subject Class
……............................................ ….....................................
Semester
…............................................ Roll No ….................................
INDEX
Experiment Experiment Submission
S.No. Remarks/signature
Description Date Date
Write a program to print
1
“Hello, World”.
print(“Hello, World”)
OUTPUT:
PROGRAM : 02
Write a program to calculate various arithmetic operations of two
numbers.
OUTPUT:
PROGRAM: 03
Write a program to find entered number is “even” or “odd”.
num=int(input("Enter number"))
if num%2==0:
print("Number is even")
else:
print("Number is odd")
OUTPUT:
PROGRAM: 04
Write a program to calculate the factorial of entered number.
num=int(input("Enter number"))
factorial = 1
if num < 0:
print("Sorry, factorial does not exist for negative numbers")
elif num == 0:
print("The factorial of 0 is 1")
else:
for i in range(1,num + 1):
factorial = factorial*i
print("The factorial of",num,"is",factorial)
OUTPUT:
PROGRAM: 05
OUTPUT:
PROGRAM: 06
OUTPUT:
PROGRAM: 07
OUTPUT:
PROGRAM: 08
OUTPUT:
PROGRAM: 09
OUTPUT:
PROGRAM: 10
OUTPUT: