You are on page 1of 42

LITTLE KINGDOM

SENIOR SECONDARY SCHOOL

RECORD NOTE BOOK

NAME :...................................................
REG NO :...................................................
SUBJECT:....................................................
CLASS :....................................................
TABLE OF CONTENTS
S.No Title Page No
1 Sum of two numbers
2 Product of two numbers
3 Division of two numbers
4 Subtraction of two numbers
5 Sum of two numbers using integers
6 Product of two numbers using integers
7 Division of two numbers using integers
8 Subtraction of two numbers using integers
9 Sum of two numbers using float
10 Product of two numbers using float
11 Division of two numbers using float
12 Subtraction of two numbers using float
13 String on multiple lines
14 Repeat string
15 Merging of two string
16 Position of a letter in the string
17 Length of the string
18 Joining the string and number
19 Find profit or loss using if statement
20 Check the prime number or not using For loop
OUTPUT:
1. Sum of Two Numbers
Aim

To write a program in python to calculate the sum of two numbers.

Algorithm
1. Start
2. Assign the value of a is 5
3. Assign the value of b is 6
4. Calculate sum= a+b
5. Print the value of sum
6. Stop

Coding
a=5
b=6
sum=a+b
print(“sum:”,sum)

Result
The given python coding is executed and output is verified.
Output
2. Product of Two Numbers
Aim

To write a program in python to calculate the product of two numbers.

Algorithm
1. Start
2. Assign the value of a is 5
3. Assign the value of b is 6
4. Calculate product= a*b
5. Print the value of product
6. Stop

Coding
a=5
b=6
product=a*b
print(“product:”,product)

Result
The given python coding is executed and output is verified.
Output
3. Division of Two Numbers
Aim

To write a program in python to calculate the Division of two numbers.

Algorithm
1. Start
2. Assign the value of a is 6
3. Assign the value of b is 6
4. Calculate division= a/b
5. Print the value of division
6. Stop

Coding
a=6
b=6
division=a/b
print(“division:”, division)

Result
The given python coding is executed and output is verified.
Output
4. Subtraction of Two Numbers
Aim

To write a program in python to calculate the subtraction of two numbers.

Algorithm
1. Start
2. Assign the value of a is 10
3. Assign the value of b is 6
4. Calculate subtraction= a-b
5. Print the value of subtraction
6. Stop

Coding
a=10
b=6
subtraction=a-b
print(“subtraction:”, subtraction)

Result
The given python coding is executed and output is verified.
Output
5. Sum of Two Numbers Using Integer
Aim

To write a program in python to calculate the sum of two numbers using


integer.

Algorithm
1. Start
2. Assign the value of a is 5
3. Assign the value of b is 6
4. Calculate sum= a+b
5. Print the value of sum
6. Stop

Coding
a=5
b=6
sum=a+b
print(“sum:”,sum)

Result
The given python coding is executed and output is verified.
Output
6. Product of Two Numbers Using Integer
Aim

To write a program in python to calculate the product of two numbers using


integer.

Algorithm
1. Start
2. Assign the value of a is 5
3. Assign the value of b is 6
4. Calculate product= a*b
5. Print the value of product
6. Stop

Coding
a=5
b=6
product=a*b
print(“product:”,product)

Result
The given python coding is executed and output is verified.
Output
7. Division of Two Numbers Using Integer
Aim

To write a program in python to calculate the Division of two numbers using


integer.

Algorithm
1. Start
2. Assign the value of a is 6
3. Assign the value of b is 6
4. Calculate division= a/b
5. Print the value of division
6. Stop

Coding
a=6
b=6
division=a/b
print(“division:”, division)

Result
The given python coding is executed and output is verified.
Output
8. Subtraction of Two Numbers Using Integer
Aim

To write a program in python to calculate the subtraction of two numbers.

Algorithm
1. Start
2. Assign the value of a is 10
3. Assign the value of b is 6
4. Calculate subtraction= a-b
5. Print the value of subtraction
6. Stop

Coding
a=10
b=6
subtraction=a-b
print(“subtraction:”, subtraction)

Result
The given python coding is executed and output is verified.
Output
9. Sum of Two Numbers Using Float
Aim

To write a program in python to calculate the sum of two numbers using float.

Algorithm
1. Start
2. Assign the value of a is 5.2
3. Assign the value of b is 6.2
4. Calculate sum= a+b
5. Print the value of sum
6. Stop

Coding
a=5.2
b=6.2
sum=a+b
print(“sum:”,sum)

Result
The given python coding is executed and output is verified.
Output
10. Product of Two Numbers Using Float
Aim

To write a program in python to calculate the product of two numbers using


float.

Algorithm
1. Start
2. Assign the value of a is 5.4
3. Assign the value of b is 6.4
4. Calculate product= a*b
5. Print the value of product
6. Stop

Coding
a=5.4
b=6.4
product=a*b
print(“product:”,product)

Result
The given python coding is executed and output is verified.
Output
11. Division of Two Numbers Using Float
Aim

To write a program in python to calculate the Division of two numbers using


float.

Algorithm
1. Start
2. Assign the value of a is 6.9
3. Assign the value of b is 6.9
4. Calculate division= a/b
5. Print the value of division
6. Stop

Coding
a=6.9
b=6.9
division=a/b
print(“division:”, division)

Result
The given python coding is executed and output is verified.
Output
12. Subtraction of Two Numbers Using Float
Aim

To write a program in python to calculate the subtraction of two numbers using


float .

Algorithm
1. Start
2. Assign the value of a is 10.8
3. Assign the value of b is 6.8
4. Calculate subtraction= a-b
5. Print the value of subtraction
6. Stop

Coding
a=10.8
b=6.8
subtraction=a-b
print(“subtraction:”, subtraction)

Result
The given python coding is executed and output is verified.
Output
13.String on Multiple Lines
Aim

To write a program in python to bring multiple lines in string.

Algorithm

1. Start

2. Get the input of string

3. Print the string

4. Stop

Coding

print\
(“””
Little kingdom school
Soliplayam
Tirupr
“””)

Result
The given python coding is executed and output is verified.
Output
14. Repeat String
Aim

To write a program in python to create a repeat string.

Algorithm

1. Start

2. Get a string of a

3. Print the string

4. Stop

Coding

a=likis
print(a*10)

Result
The given python coding is executed and output is verified.
Output
15. Merging of two string
Aim

To write a program in python to merging two different string into a single


string.

Algorithm

1. Start

2. Get a first string

3.Get a second string

4. Print the string

5. Stop

Coding

a=likis
b= cbse
print (a+b)

Result
The given python coding is executed and output is verified.
Output
16. Position of a Letter in the String
Aim

To write a program in python to identify the position of the letter in the string.

Algorithm

1. Start

2. Get the input of the string

3. Print the position of the letter

4. Stop

Coding

A=”hello world”
print(A[2])

Result
The given python coding is executed and output is verified.
Output
17. Length of the String
Aim

To write a program in python to identify the length of the string.

Algorithm

1. Start

2. Get the input of the string

3. Print the length of the string

4. Stop

Coding

A=”little kingdom”
print(len(A))

Result
The given python coding is executed and output is verified.
Output
18. Joining the String and Number

Aim

To write a program in python to join the string and number.

Algorithm

1. Start

2. Assign the value of Age as 15

3. Add Age in the Text.

4.Print the string

5. Stop

Coding

age =23
Text=”my name is hari and age is “+str(age)
print(Text)

Result
The given python coding is executed and output is verified.
Output
19. Find Profit or Loss Using IF Statement
Aim

To write a program in python to find profit or loss using if statement.

Algorithm

1. Start

2. Get the input of the cp

3. Get the input of the sp

4. check if, elif and else condition

4.Print the profit or loss

5. Stop

Coding

cp = float(input("Enter cost price (in Rs): "))


sp= float(input("Enter selling price(in Rs): "))
if cp>sp:
print("Loss incurred:", cp-sp,"Rs")
elif cp==sp:
print("No profit, No loss")
else:
print("profit gained:", sp-cp", Rs")

Result
The given python coding is executed and output is verified.
Output
20. Check the Prime Number or Not Using For loop
Aim

To write a program in python to find prime number or not using FOR loop.

Algorithm

1. Start

2. Get the input of the num

3. Check for, if, else condition

4.Print the prime number

5. Stop

Coding

num= int(input("Enter Number :"))


if x >1:
for i in range(2,num):
if (num% i) == 0:
print(num, "is not a prime number")
break
else:
print(num, "is a prime number")
else:
print(num, "is not a prime number")

Result
The given python coding is executed and output is verified.

You might also like