Class XI : Chapter 1 - Python Fundamental Test 12

 

Python Fundamental Test 12

Q1. Write a program to find the average of five numbers.

Q2. Write a program to find the square of a number accepted from user.

Q3. Write a program to convert kilometer into centimeter.

Q4. Write a program to convert degree Celsius to kelvin.

Q5. Write a program to convert degree Celsius to Fahrenheit.

Q6. Write a program to calculate the simple interest.

Q7. Write a program to accept time in seconds and convert it into

    hours, minutes and seconds.

Q8. Write a program to convert milligrams into kilograms.

Q9. Write a program to find the square root of a number.

Q10. Write a program to accept two numbers and display their

  •  Sum
  • Difference
  • Product
  • Multiplication

Class XI : Chapter 1 Python Fundamental Test -11

 

Class XI: Python Fundamental Test 11


Q1. Is python a case sensitive language?

Q2. 63 is maximum possible length of identifier (T/F)

Q3. Print function is used to accept data from the user (T/F)

Q4. Python programs typed in __________ mode.

Q5. Which keyword in python is in upper case?

Q6. Variable names can be of __________ length.

Q7. Write the output of the following:

>>> a, b c = 10, 20, 30

>>> a = b + c

>>> print (a, b, c)

Q8. Identify the invalid variable name and specify the reason.

  •  Place
  • Cut_1
  • 12A
  • A#b
  • A1 b

Q9. Write the output of the following.

>>>print (“Introduction to Python\n Class\t XI”)

Q10. Write the output of the following:

>>>print(5*1**9)

Python : Looping Statement Test 3

 

Looping Statement Test 3

Q1. Convert the following while loop into for loop and also find the output.

S. No.

CODE

OUTPUT

a.

x=5

while(x<15):

  print(x**2)

  x+=3

 

 

b.

a=7

b=5

while(a<9):

  print(a+b)

  a+=1

 

 

c.

b=5

while(b<9):

  print("H")

  b+=1

 

 

d.

b=15

while(b>9):

  print("Hello")

  b=b-2

 

 

e.

x=15

while(x==15):

  print("Hello")

  x=x-3

 

 

 

Python : Looping Statement Test 2

 Q1. Write the output of the following code

  a.                  

Python : Looping Statement Test 1

Q1. Write the output of the following

  • for i in "python":

    print (i)
  • for i in range(5):
        print(i)
  • 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 sum 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.

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

Python : Conditional Statement Test 2

Q1. Write a program to accept percentage from the user and display the grade according to the following criteria:

                    Marks                                    Grade

                    > 90                                        A

                   >80 and <=90                          B

                   >=60 and <80                          C

                   below 60                                  D

Q2. Write a program to accept the cost price of a bike and display the road tax to be paid according to the following criteria :

                                   

Q3. Write a program to check whether an years is leap year or not.

Q4. Write a program to accept a number from 1 to 7 and dsplay the name of the day like 1 for Sunday , 2 for monday and so on.

Q5. Write a progam to accept a number from 1 to 12 and display name of the month and days in that month like 1 for january and number of days 31 .......

Q6. What do you mean by statement?

Q7. Write the output of the following:
                    if True:
                        print(101)
                    else:
                        print(202)
Q8. Write the logical expression for the following:
  1. A is greater than B and C is greater than D
Q9. Accept any city from the user and display monument of that city
                        
Q10. Write the output of the following if a = 9
            if (a > 5 and a <=10):
                print("Hello")
            else:
                print("Bye")

Python - Conditional Statement Test 1

 Q1. Name the keyword which helps in writing code involves condition.

Q2. Write the syntax of simple if statement.

Q3. Is there any limit of statement that can appear under an if block.

Q4. Write a program to check whether a person is eligible for voting or not. (accept age from user)

Q5. Write a program to check whether a number entered by user is even or odd.

Q6. Write a program to check whether a number is divisible by 7 or not.

Q7. Write a program to display "Hello" if a number entered by user is a multiple of fie , otherwise print "Bye".

Q8. Write a program to calculate the electricity bill according to the following criteria :

                    unit                                price

                    First 100 units -----------no charge

                    Next 100 units ----------Rs 5 / unit

                    Next units ---------------Rs 10/unit

(For example if input unit is 350 than total bill amount is Rs2000)

Q9. Write a program to display the last digit of a number.

(hint : any number % 10 will retun the last digit)

Q10. Write a program to check whether the last digit of a number( entered by user ) is divisible by 3 or not.

Most Recently Published

File Handling Test 6

 File Handling Test 6 Q1 . Do we need to use the close() function when we use 'with' statement to open a file? Q2. Which mode you wi...

CS - IP Assignment/Worksheet