0% found this document useful (0 votes)
9 views9 pages

SQL and Python Question Bank for Class XI

its a question bank

Uploaded by

black 888
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)
9 views9 pages

SQL and Python Question Bank for Class XI

its a question bank

Uploaded by

black 888
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

QUESTION BANK

CLASS XI INFORMATICS PRACTICES


SQL
1. Name the command which is used to change the data permanently in a
table.
2. ……………..clause is used to retrieve only unique values for a column in
a table.
3. …………..means raw and unorganized facts and figures.
4. ……………..is a default table in MySQL and it is a one-row, one-column
dummy table.
5. ……………operator is also termed as negation operator.
6. Write the name of one relational operator.
7. Name the software which is used to create and manage databases.
8. A person who is responsible for defining the database, ensuring security
features in the database is known as …………………….
9. Write a command to display the structure of a table grocery.
[Link] ………………….data is stored in tabular form.
[Link] SQL command to list all table names in a database shop.
12.………………………data type is used to store numbers without decimal
points.
[Link] subset of data in a table is called…………
[Link] a command ………………..clause is used to arrange data in ascending
order.
15.…………….means unknown or unassigned values.
[Link] the special operator which is used for pattern matching.
17. …………………command is used to enter a new record in a table.
18.………………… is the possible set of values that a column may contain.
19.………………..column cannot take null values.
[Link] the command which is used to add a new column in a table.
21.A table may have more than one …………….key.
22.…………… is used to give alternate temporary name for the columns in
a table.
23.………………………………command is used to remove a database
permanently from SQL.

1
[Link] the functions of DBMS with example.
[Link] the four main keys in a database.
[Link] is MySQL? Explain the Characteristics of MySQL.
[Link] is pattern matching? Name the wildcard characters used for pattern
matching.
[Link] char and varchar data types in SQL.
[Link] do you mean by aggregate functions? Explain any three aggregate
functions with example.
[Link] subset of data in a table is called_________
[Link] delete and drop commands in SQL.
[Link] the different purposes of Alter command with example.
33.A table bank contains the columns ano and name. Ano stands for
AccoNo. Write commands
a. To change the name of account no. 101 to “Amal”.
b. To display account no in the descending order of name.
c. To display names starting with character ‘S’ and ending with ‘p’
d. To delete the record of account no. 201.
e. To display all the details of customers with unassigned names.
f. To display all names which contains 4 characters and the second
character is ‘a’.
[Link] the following command using “BETWEEN” operator.
Select * from class where mark>=20 && mark<=30;
35. Write the following command using “IN” operator.
Select * from shop where item=”pen” or item=”pencil” or item=”eraser”;
36. Name the different categories of SQL commands and write two
commands belong to any two categories.
37.___________command is used to display the structure of a specific table.
[Link] number of columns in a table is called _____
[Link] are the different categories of SQL commands. Mention any two
commands belongs to each category.
[Link] the following table employee:-
E_Id E_Name Salary
201 Joseph 45000
302 Amala 40000
402 Dhyan 38000
Write commands for the following:-
a. Display names of employees whose salary between 40000 and
45000. (including both the values)
b. Increase the salary of all employees by 10%
c. Display the name and salary of employees whose name starts with
the alphabet ‘A’.

2
d. Arrange all the records in descending order of salary.
e. Add a new column designation.
f. Display total number of characters in each name.
g. Display the total number of employees.
h. Find the average salary of employees .
i. Delete the record of ‘Amala’.
j. Remove the table employee.
[Link] between candidate key and alternate key.
[Link] the output of the following commands.
a) Select (3+2)*3; (b) Select 5+2*3/2%3;
COMPUTER BASICS
[Link] do you mean by language processors?
[Link] are registers?
[Link] short note on RAM memory.
46.____________memory is used to reduce the speed mismatch between CPU
and primary memory.
47._______________is the first set of instructions run by computer when
power on.
[Link] are the basic units of computer memory?
49. Compare proprietary software and open source software

PYTHON

[Link] the programming language from the given list.


MySQL, Oracle, Java, Microsoft Word.
[Link] the output of the following statement.
print(2,3,4,end=”\n”)
[Link] L-value and R-value of the following statement.
Mark=45
[Link] the valid variable names from the given list.
@mark1, name1, _rno, first-name
[Link] will be the output produced by the following code?
name=”Aarav”
age=21
print(name,”you are”,age,“now”)
[Link] data type will be used to represent the following values?
I. Mobile number
II. Name of the student
3
[Link] the output of the following statement.
print(12,33,24,sep='/',end='!')
[Link] the relational operators are applied to strings, strings are compared
from left to right, character by character based on their ______code.
[Link] the type of error in the following statement.
Print(21+34)
[Link] would the following code do?
a=b=c=230

[Link] many times the loop will execute?


x,y=2,3
for i in range(y*2-3):
print(i)
[Link] values we assign to the variables, the data type of the variable
will be the same as the data type of the value. This feature of Python is
called_______
68.A loop that never ends is called an __________ loop
69. Write Python expression equivalent to the following:-
32+94
2
[Link] input() and eval() functions in python.
Answer:
input() function is used to input values while executing the program.
Datatype of input() function will be string.
Eval() function converts string data type into int or float based on the
inputted value.
Eg:
A=eval(input(“Enter the value of a:”))
If a’s value is 2.5, input function consider it as a string, but eval() function
converts it into float.
If a’s value is 2, input function consider it as a string, but eval() function
converts it into int.

[Link] Python a case sensitive language. Justify your answer with an example.

4
[Link] do you mean by comments? Explain various methods to give
comments with example.

[Link] unary and binary operators. Write examples for each.


Answer
Unary operator contains only one operand.
Eg:- +2 (here 2 is the operand)
Binary operator contains only two operands.
Eg:- 3+2 (here 3, 2 are the operands)

[Link] logical expression for the following:-


A. Either A is less than B or A is less than C
B. Name is Amal and age between 16 and 18
[Link] a program to swap the values of 3 variables.
[Link] the output of the following code:

x=4
if x>3:
if x>5:
print(‘a’)
else:
print(‘b’)
print(‘d’)
[Link] a program to convert the time inputted into hours and minutes.
[Link] the output:-
D={‘Jan’:31,’;Feb’:29,’Mar’:31}
for I in D:
print(I)
print(I,”@”,D[I])

[Link] the following:-


I. (12 + 3) * 5 – 6 / 3
II. X=3
Y+=X*3
X+=Y
print(X,Y)

5
[Link] Python expression equivalent to the following:-
I.
42+54
3
II. To find the integer part of the quotient when 100 is diviby 32.
[Link] the output of the following program on execution x=50

if x>10:
if x>25:
print(‘ok’)
if x > 60:
print(‘good’)
elif x >40:
print(“average”)
else:
print(“no output”)

82. What will be the output:-


a = {}
a[1] = 10
a[2] = 20
a[1]= a[1]+1
a[2]=a[1]+20
print(a)
[Link] a dictionary to store names of countries and theircurrencies.
Display the name of the currency when user is inputting a country.

[Link] the following expressions manually


C. 1+3**3-6/2
D. 3+3*5//(4+4)+6/2
[Link] the errors in the following code segment and rewrite with correct
code.
c=input(“Enter your class”)
print(“Last year you were in class”c-1)
[Link] the output
a,b=20,30
a,b=a+1,a+b

6
print(a,b)
[Link] the output of the following:
x,y=7,2
x,y,x=x+1,y+3,x+10
print(x,y)
[Link] the type of error in the following statement and write the correct
code.
print('aaa','bba','ccz',end='$',sep='*',ddv)
[Link] the following into while loop.
for i in range(10):
print(i)
[Link] the output:-
L=[120,320,430]
for I in L:
print(I)
[Link] a program to find the largest and smallest number in a list?

[Link] a program to input a number and find the cube of the second last
digit.
[Link] many times the following loop will execute? What will be the output?

a=4
b=2
while b!=0:
r=a%b
a=b
b=r
print(a)
[Link] the following program using while loop

for a in range(0,5,1):
print(a)
[Link] a program to display the following series:-
0 1 1 2 3 5 8 13 21
[Link] the output of the following code:

x=3

7
if x>2 and x<=5:
print(“ok”)
else:
print(“no output”)
[Link] errors in the following code and rewrite the correct code

x=eval(“Enter the value of x:”)


if x=’winter’:
print “winter season”
elseif x=’rainy’:
print “rainy season”
else:
print “summer season”
[Link] the output of the following program:-
p=10
q=30
p*=q/3
q+=p+q*2
print(p,q)
[Link] a program to find the factorial of the given number.
100. Explain different types of errors with example.

101. Explain the 3 main components of a variable with syntax and


example.
102. How many times the following loops will execute?
I.
name=”Arjun”
for a in name:
print(a)
II.
for x in range(0,10,5):
print(x)
III.
x=10
while x>10:
print(x)
x=x+3

8
103. Find the output of the following statements:
I.
print(21>32)
II. for p in ‘123’:
print(“100”,p)

III. a=2

print(type(a))

IV. a=20

b=3

b+=a+b//3

print(a,b)

********************

You might also like