0% found this document useful (0 votes)
11 views14 pages

Review of Python Basic and DFH (1)

Uploaded by

asthagoswami77
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)
11 views14 pages

Review of Python Basic and DFH (1)

Uploaded by

asthagoswami77
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
You are on page 1/ 14

m

CS PRACTICAL FILE

NAME: ASTHA GOSWAMI


CLASS: 12TH-A
CBSE ROLL NO:
S.no Content Page.no
1 To define a simple function by using the 3
command “def func1():” and call the function.
2 To write a user-defined function to print a 3
right-angled triangle.
3 To write a Python function to compute area of 4
a rectangle.
4 Illustrating the concept of if statement, to 4
determine whether a person is eligible to vote.
5 Illustrating the concept of if statement, display 5
the grade of the topper in the class.
6 Illustrating the concept of if-else statement. 5

7 Illustrating the concept of for loop statement. 6


8 Illustrating the concept of for loop statement. 6
9 Program to generate the table of a number 7
using for loop.
10 To calculate and display the factorial of an 7
inputted number.
11 Program to find the sum of the series 8

12 Illustrating the concept of while loop 8


statement.
13 WAP to second find the largest element in a 9
list ‘NUM’.
14 Give python code to accept values from the 10
user up to a certain limit entered by the user;
if the number is even, then add it to a list.
15 Program to find absolute value of a number in 10
Python.

1|Page
16 Write a Python code to store ‘n’ number of 11
subjects in tuple.
17 To create a dictionary by passing nested list as 11
an argument to dict() function.
18 Program to perform linear search on a tuple of 12
numbers.
19 To create an empty dictionary, by assigning 12
two curly braces to a variable name:
20 WAP to input total number of section and 13
stream name in 11th class and display at
information on the output screen.

2|Page
Review of python basic
Practical Implementation-1
To define a simple function by using the command “def
func1():” and call the function.

Practical Implementation-2
To write a user-defined function to print a right-angled
triangle.

3|Page
Practical Implementation-3
To write a Python function to compute area of a rectangle.

******OUTPUT******

Practical Implemenation-4
Illustrating the concept of if statement, to determine
whether a person is eligible to vote.

******OUTPUT******

4|Page
Practical Implementation-5
Illustrating the concept of if statement, display the grade of
the topper in the class.

******OUTPUT******

Practical Implementation-6
Illustrating the concept of if-else statement.

******OUTPUT******

5|Page
Practical Implementation-7
Illustrating the concept of for loop statement.

******OUTPUT******

Practical Implementation-8
Illustrating the concept of for loop statement.

******OUTPUT******

6|Page
Practical Implementation-9
Program to generate the table of a number using for loop.

******OUTPUT******

Practical Implementation-10
To calculate and display the factorial of an inputted number.

******OUTPUT******

7|Page
Practical Implementation-11
Program to find the sum of the series:
S=1+x+x2+x3+x4…+xn

******OUTPUT******

Practical Implementation-12
Illustrating the concept of while loop statement.

******OUTPUT******

8|Page
Practical Implementation-13
WAP to second find the largest element in a list ‘NUM’.

******OUTPUT ******

9|Page
Practical Implementation-14
Give python code to accept values from the user up to a
certain limit entered by the user; if the number is even, then
add it to a list.

******OUTPUT******

Practical Implementation-15
Program to find absolute value of a number in Python.

******OUTPUT******

10 | P a g e
Practical Implementation-16
Write a Python code to store ‘n’ number of subjects in tuple.

******OUTPUT******

Practical Implementation-17
To create a dictionary by passing nested list as an argument
to dict() function.
A=[[1,”one”] , [2,”two”] , [3,”three’]]
>>>c=dict(a)
>>>c
{1:’one’,2:’two’,3:’three’}

11 | P a g e
Practical Implementation-18
Program to perform linear search on a tuple of numbers.

******OUTPUT******

Practical Implementation-19
To create an empty dictionary, by assigning two curly braces
to a variable name:
>>>d1 = ()
>>>type (d1)
<class ‘dict’>

12 | P a g e
Practical Implementation-20
WAP to input total number of section and stream name in
11th class and display at information on the output screen.

******OUTPUT******

13 | P a g e

You might also like