CS Report File Part 1
CS Report File Part 1
(CBSE)
Guduvanchery
Name
Register Number
CONTENTS
EX. PAGE TEACHER’S
DATE NAME OF THE PROGRAM
NO. NO. SIGNATURE
PYTHON
EX: NO: 1 ARITHMETIC CALCULATOR
DATE:
QUESTION:
Write a Python program to implement Arithmetic Calculator using if…elif…else statement.
AIM:
To write a Python program to implement Arithmetic Calculator using if…elif…else statement.
ALGORITHM:
Step 1: Start.
Step 2: Get two numbers as input, say num1 and num2.
Step 3: Initialize a variable, result to 0.
Step 4: Get the desired arithmetic operator as input from the user and store it in a variable, opr.
Step 5: Based on the user’s input, perform the desired arithmetic operation using if…elif…else statement.
Step 6: Print the result.
Step 7: Stop.
CODING:
RESULT:
Thus, a Python program to implement Arithmetic Calculator using if…elif…else statement has been
successfully executed and the output is verified.
1|Page
EXECUTION AND OUTPUT:
2|Page
EX: NO: 2 MATHEMATICAL FUNCTIONS
DATE:
QUESTION:
Write a Python program to illustrate Mathematical Functions.
AIM:
To write a Python program to illustrate Mathematical Functions.
ALGORITHM:
Step 1: Start.
Step 2: Import the math module.
Step 3: Perform the desired math functions and calculate the result.
Step 4: Print the result.
Step 5: Stop.
CODING:
RESULT:
Thus, a Python program to illustrate Mathematical functions has been successfully executed and the output is
verified.
3|Page
EXECUTION AND OUTPUT:
4|Page
EX: NO: 3 STRING FUNCTIONS
DATE:
QUESTION:
Write a Python program to illustrate String Functions.
AIM:
To write a Python program to illustrate String Functions.
ALGORITHM:
Step 1: Start.
Step 2: Input the strings.
Step 3: Perform the desired string functions.
Step 4: Print the result.
Step 5: Stop.
CODING:
RESULT:
Thus, a Python program to illustrate String functions has been successfully executed and the output is
verified.
5|Page
EXECUTION AND OUTPUT:
6|Page
EX: NO: 4 LIST MANIPULATION METHODS
DATE:
QUESTION:
Write a Python program to illustrate List Manipulation Methods.
AIM:
To write a Python program to illustrate List Manipulation Methods.
ALGORITHM:
Step 1: Start.
Step 2: Read the list elements from the user.
Step 3: Display a menu with various list manipulation methods and get the desired choice from the user.
Step 4: Based on the user’s input, perform the operations
Step 5: Print the new list.
Step 6: Stop.
7|Page
CODING:
RESULT:
Thus, a Python program to illustrate List Manipulation Methods has been successfully executed and the
output is verified.
8|Page
EXECUTION AND OUTPUT:
9|Page
10 | P a g e
EX: NO: 5 TUPLE MANIPULATION METHODS
DATE:
QUESTION:
Write a Python program to illustrate Tuple Manipulation Methods.
AIM:
To write a Python program to illustrate Tuple Manipulation Methods.
ALGORITHM:
Step 1: Start.
Step 2: Read the Tuple elements from the user.
Step 3: Display a menu with various tuple manipulation methods and get the desired choice from the user.
Step 4: Based on the user’s input, perform the operations.
Step 5: Print the result.
Step 6: Stop.
CODING:
RESULT:
Thus, a Python program to illustrate Tuple Manipulation Methods has been successfully executed and the
output is verified.
11 | P a g e
EXECUTION AND OUTPUT:
12 | P a g e
EX: NO: 6 DICTIONARY FUNCTIONS
DATE:
QUESTION:
Write a Python program to illustrate Dictionary Functions.
AIM:
To write a Python program to illustrate Dictionary Functions.
ALGORITHM:
Step 1: Start.
Step 2: Input the dictionaries.
Step 3: Perform the desired dictionary methods.
Step 4: Print the result.
Step 5: Stop.
CODING:
RESULT:
Thus, a Python program to illustrate Dictionary functions has been successfully executed and the output is
verified.
13 | P a g e
EXECUTION AND OUTPUT:
14 | P a g e
EX: NO: 7 RANDOM NUMBER GENERATOR
DATE:
QUESTION:
Write a Python program to implement a Random Number Generator that generates random numbers between 1
and 6 (simulates a dice).
AIM:
To write a Python program to implement a Random Number Generator that generates random numbers between
1 and 6 (simulates a dice).
ALGORITHM:
Step 1: Start.
Step 2: Import the random module.
Step 3: Read the user’s choice to roll the dice, using a variable, say roll.
Step 4: If roll == ‘y’, then roll the dice and generate a random number between 1 and 6 using randint(1, 6).
Step 5: Print the random number.
Step 6: Repeat Steps 4 and 5, if the user’s input is ‘y’ again.
Step 7: Stop.
CODING:
RESULT:
Thus, a Python program to implement a Random Number Generator that generates random numbers between
1 and 6 (simulates a dice) has been successfully executed and the output is verified.
15 | P a g e
EXECUTION AND OUTPUT:
16 | P a g e