Arts (English Medium) Class 12 - CBSE Important Questions for Computer Science (Python)

Advertisements
Subjects
Topics
Subjects
Popular subjects
Topics
Advertisements
Advertisements
Computer Science (Python)
< prev  1 to 20 of 220  next > 

Write two points of difference between XML and HTML.

Appears in 2 question papers
Chapter: [0.05] Python - Communication Technologies
Concept: Hyper Text Markup Language (HTML)

Write the full form of the following protocol:

TCP

Appears in 2 question papers
Chapter: [0.05] Python - Communication Technologies
Concept: Network Protocol - TCP/IP (Transmission Control Protocol/Internet Protocol)

Write two points of difference between XML and HTML.

Appears in 2 question papers
Chapter: [0.1] Computer Networks
Concept: Hyper Text Markup Language (HTML)

Expand the following in the context of Internet Protocol:

POP3

Appears in 2 question papers
Chapter: [0.11] Data Communication
Concept: Network Protocol

Write the full form of the following protocol:

TCP

Appears in 2 question papers
Chapter: [0.11] Data Communication
Concept: Network Protocol - TCP/IP (Transmission Control Protocol/Internet Protocol)

State True or False.

“Variable declaration is implicit in Python.”

Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Scope of a Variable

Which of the following is an invalid datatype in Python?

Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Introduction of Exception Handling in Python

Assertion (A): If the arguments in function call statement match the number and order of arguments as defined in the function definition, such arguments are called positional arguments.

Reasoning (R): During a function call, the argument list first contains default argument(s) followed by the positional argument(s).

Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Arguments and Parameters

Select the correct output of the code:

a = "Year 2022 at All the best"
a = a.split('2')
b = a[0] + ". " + a[1] + ". " + a[3]
print (b)
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Types of Function

Which of the following statement(s) would give an error after executing the following code?

S="Welcome to class XII" # Statement 1
print(S)       #Statement 2
S="Thank you"    # Statement 3
S[0]= '@'      # Statement 4
S=S+"Thank you"   # Statement 5
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Built-in Exceptions

Rao has written a code to input a number and check whether it is prime or not. His code is having errors. Rewrite the correct code and underline the corrections made.

def prime():
n=int(input("Enter number to check :: ")
for i in range (2, n//2):
if n%i=0:
print("Number is not prime \n")
break
else:
print("Number is prime \n’)
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Built-in Exceptions

Predict the output of the Python code given below:

def Diff(N1,N2):
 if N1>N2:
 return N1-N2
 else:
 return N2-N1

NUM= [10,23,14,54,32]
for CNT in range (4,0,-1):
 A=NUM[CNT]
 B=NUM[CNT-1]
 print(Diff(A,B),'#', end=' ')
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Handling Exceptions

Write a function INDEX_LIST(L), where L is the list of elements passed as arguments to the function. The function returns another list named ‘indexList’ that stores the indices of all Non-Zero Elements of L.

For example:

If L contains [12, 4, 0, 11, 0, 56]

The indexList will have - [0, 1, 3, 5].

Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Function Returning Values

Consider the given expression:

not True and False or True

Which of the following will be the correct output if the given expression is evaluated?

Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Types of Function

State True or False.

"Identifiers are names used to identify a variable or function in a program".

Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Scope of a Variable
  • Assertion (A): To use a function from a particular module, we need to import the module.
  • Reason (R): Import statement can be written anywhere in the program, before using a function from that module.
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Types of Function

Atharva is a Python programmer working on a program to find and return the maximum value from the list. The code written below has syntactical errors. Rewrite the correct code and underline the corrections made.

def max_num (L) :
        max=L(O)
        for a in L:
                if a > max
                 max=a
return max
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Syntax Errors

Write a function EOReplaceO in Python which accepts a list L of numbers. Thereafter, it increments all even numbers by 1 and decrements all odd numbers by 1.

Example:
If Sample Input data of the list is:
L = [10, 20, 30, 40, 35, 55]
Output will be: L = (11, 21, 31, 41, 34, 54]

Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Creating User Defined Function

Write the output of the code given below:

def short_sub (1st, n):
for i in range (0, n) :
      if len (1st) > 4 :
          1st [i] = 1st [i] + 1st [i]
      else:
          1st [i] = 1st [i]
subject = ['CS', 'HINDI', 'PHYSICS','CHEMISTRY', 'MATHS'] short_sub
(subject, 5)
print (subject)
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Creating User Defined Function

Write the output of the code given below:

a = 30
def call (x) :
          global a
          if a%2==0:
          x + = a
else:
         x-=a
return x 
       x=20
print (call (35), end="#") 
print (call (40), end="@")
Appears in 1 question paper
Chapter: [0.01] Exceptional Handling in Python
Concept: Creating User Defined Function
< prev  1 to 20 of 220  next > 
Advertisements
Share
Notifications



      Forgot password?
Use app×