Class 12 – How to handle Binary File in Python – Easy Handout

In this article you will be able to understand about handling Binary File in python in a very simplified language. Remember the important points and also practice the programs mentioned in the following Handout. So lets start Binary File in Python What is Binary File ? Binary Files are not in human readable format. It … Read more

10 Important Questions of Text File Handling in Python

Important Questions of File Handling in Python from previous years Sample Paper Q1. Write a function in Python that counts the number of “Me” or “My” (in smaller case also) words present in a text file “STORY.TXT”. If the “STORY.TXT” contents are as follows: My first book was Me and My Family. It gave me … Read more

Text File Handling in Python Handout

Text File Handling in Python Handout is written in a very simple language which can be understood by all students. You will see the QnA session in between the content which will help you to assess yourself. Table of Content Text File Handling in Python Handout – Part 1 Text File Handling in Python Handout … Read more

40+ Important Python File Handling Practice Questions

Python File Handling Practice Questions Table of Content Python File Handling Practice Questions – Test 1 Python File Handling Practice Questions – Test 2 Python File Handling Practice Questions – Test 3 Python File Handling Practice Questions – Test 4 Python File Handling Practice Questions – Test 1 Q1. Name two types of data files … Read more

100 Important Practice Questions of String in Python

Table of Content Practice Questions of String in Python – Test 1 Practice Questions of String in Python – Test 2 Practice Questions of String in Python – Test 3 Practice Questions of String in Python – Test 4 Practice Questions of String in Python – Test 5 Practice Questions of String in Python – … Read more

70+(solved) Important Practice Questions of Loops in Python

Practice Questions of loops in python
Practice Questions of loops in python

Practice Questions of Loops in Python — Test 1

Q1. Write the output of the following:

1.  for i in "Myblog":
         print (i, '?')



2.  for i in range(5):
        print(i)



3. for i in range(10,15):
        print(i)



Q2. Write a program to print first 10 natural number.


Q3. Write a program to print first 10 even numbers.


Q4. Write a program to print first 10 odd numbers.


Q5. Write a program to print first 10 even numbers in reverse order.


Q6. Write a program to print table of a number accepted from user.


Q7. Write a program to display product of the digits of a number accepted from the user.


Q8. Write a program to find the factorial of a number.


Q9. Write a program to find the sum of the digits of a number accepted from user


Q10. Write a program to check whether a number is prime or not.

Practice Questions of Loops in Python — Test 2

Q1. Write the output of the following

1. for i in (1,10):
       print(i)


2. for i in (5,9):
       print(i)


3. for i in range(2,7):
       print(i)


4. for i in "csiplearninghub":
       print(i)


5. for i in "python":
       print(i, end=' ')



6. for i in "python":
      print(i, end=='?')


7. for i in "python":
        print(i, '?$')


8. for i in (1,2,3,4):
       print(i)


9. for i in (3,4,7):
      print(i)

10. for i in range(2,10,2):
     print(i)


Practice Questions of Loops in Python — Test 6

Q1. Write the output of the following.

a=5
while a>0:
   print(a)
   a=a-1

Q2. for loop statement is terminated by symbol ___________

Q3. What is the difference between break and continue statements?

 

Q4. Convert the following loop into for loop :
x = 4
while(x<=8):
    print(x*10)
    x+=2

 

Q5. Write the output of the following:
for k in range(10,20,4):
    print(k)

Q6. Find errors in the following code:
x = input(“Enter value”)
for k in range[0,20]
    if x=k
        print(x+k)
   else:
       Print(x-k)

Q7. Write the output of the following:

x=3
if x>2 or x<5 and x==6:
    print(“Bye”)
else:
    print(“Thankyou”)

Q8. Write the output of the following:

x,y=2,4
if(x+y==10):
    print(“Thankyou”)
else:
    print(“Bye”)

Q9. Write the output of the following:

x=10
y=1
while x>y:
    x=x-4
    y=y+3
    print(x)

Q10. Write the output of the following:
for x in range(3):
    for y in range(2):
        print(“Practice Questions of loops in python”)
    print()



 

Practice Questions of Loops in Python — Test 7

Q1. What do you mean by jump statement?

Q2. What is nested loop?

Q3. Write a program to print the following pattern.

1    2     3    4 

1    2     3

1   2

1

Q4. Write a program to print the following pattern.

A

B    C

D    E    F

G    H    I    J

Q5. Write a program to print the following pattern.

A    A    A    A

A    A    A    A

A    A    A    A

A    A    A    A

Q6. Write a program to convert temperature in Fahrenheit to Celsius.

Q7. Write a program to print the factorial of a number.

Q8. Write a program to find the sum of digits of a number.

Q9. Accept two numbers from the user and display sum of even numbers between them(including both)

Q10. Write a program to reverse a number.

 

Class 12 Computer Science Sample Paper 2020-2021.

Class 12 Computer Science Sample Paper Marking Scheme

Class 12 Computer Science Test Series

error: Content is protected !!