Yash Practical File Class 12 Computer Science

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

NAME= YASH CHANDRA

CLASS= XII- B
SUBJECT= COMPUTER SCIENCE
SCHOOL= KV,SECTOR-3,ROHINI
ROLL NO=

UNDER THE GUIDANCE OF MRS.


NEELIMA SINGH MAM.
OUTPUT:
REVIEW OF PYTHON
Q1: Write a program in python to enter
numbers and find the greatest of the 2?
ANS:
OUTPUT:
Q2: Write a program in python to enter a
number and print its factorial?
ANS:
OUTPUT:
FUNCTIONS
Q1:Write a function which takes 2 parameters
and gives the result as power of values?
ANS:
OUTPUT:
Q2:Write a function to find Fibonacci series
upto n number of times where n is given as a
parameter to the function?
ANS:
Output:
Q3:MAKE A MODULE WHICH CONTAINS SUM AND
SUBTRACTION OF 2 NUMBERS?
ANS:
Output:
Q4: write a recursive function to calcula-
Te the factorial of a number.
Ans:
Output:
Data file handling
Q1: take the data from the user and store
it in a file “sample.txt”?
Ans:
Output:
Q2:write a program to check the total
number of vowels in the file “sample.txt”?
Ans:
Output:
Q3: create a menu driven program for the
area of circle ,circumference of circle
,area of rectangle and perimeter of the
rectangle?
Ans:

You might also like