0% found this document useful (0 votes)
44 views

Computer

The document contains questions related to Python programming language, SQL, and general computer topics. It includes questions that ask about Python syntax, data structures like lists and tuples, functions, string operations, data types, SQL commands, relational database concepts like primary keys, cloud computing benefits, and social media/internet safety. Multiple choice, short answer and coding questions are provided along with sample code snippets and tables to reference.

Uploaded by

Paridhi Agrawal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Computer

The document contains questions related to Python programming language, SQL, and general computer topics. It includes questions that ask about Python syntax, data structures like lists and tuples, functions, string operations, data types, SQL commands, relational database concepts like primary keys, cloud computing benefits, and social media/internet safety. Multiple choice, short answer and coding questions are provided along with sample code snippets and tables to reference.

Uploaded by

Paridhi Agrawal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Programming Language: Python

Q1(a) What is the syntax to print output in a single line. 1

(b) Define NoSQL Database. 1

(c) Differentiate between list and tuple constructs of Python 1

(d) Draw XOR gate using minimum number of NAND gate. 2

(e) What is a function call IN PYTHON? Give Example 2

(f) Write the Python code to create the dictionary to include the list of following countries
and their capital. 2

India New Delhi


Pakistan Islamabad
Srilanka Colombo
Bangladesh Dhaka

Q2(a) Write a program in python to find out greater of two numbers. 2

(b)Given the following code , write down what would be printed as output- 1

A=3

While(I in a):

Print “”Happy”**i

(c) Write pseudo-code / flowchart to input the year and to test and display whether the given
year is leap year or not? 3

(d)Write python program to calculate area of circle. The radius being the input. 2

(e)Given the following python code what values are printed as output? 2

def afunc(B):
B=B%2
Print B
A=2
afunc(A)
afunc(A+5)
Print A

Q3: a) Is python a compiled or an interpreted language? 1

b) Differentiate between compiler and interpreter. 1

c) Write a short note on string constructs in python. 2

d) What are the benefits of using cloud computing (any two)? 2

e) List some common datatypes used in python. 1

Q 4: Answer the following questions-

(a)What is the function performed by len() and reverse() in the list module. 2

(b) Find error in the given SQL code: (Consider the table: ADM ) 1

insert into values {“admin”,”write”};

Q5:Answer the following Questions:


(a) Convert: 2
A) (1234.56)10 = (?)16
B) (476)8 = (?)2
b) i) What is the role of load balancing in parallel computing? [2X1=2]
ii) Arrange the following in ascending order of memory capacity:
TB , Byte, KB, Nibble, PB, MB, GB 1
(c) Define primary key. 1
Q6:Answer the following Questions:
a) What are the rules for using social networking sites 2

b) What is Cracking? Suggest the ways to protect the computer from cyber attack. 2

c) Define eavesdropping and phishing . 2

d) What is cyber bullying. How it is done. 2


e) What are the tips to safely browse the internet. 2

Q.7 Answer the question based on the table given below:

(i) Write the SQL command to create the above table with constraints. 1

(ii) Insert 2 records with relevant information, in the table student 1

(iii) Display all the records of the table Student. 1

(iv) Delete the Student Whose Roll no is 100. 1

(v) Change the Stream of Student to ‘Computer’ Whose Roll no. is 536. 1

(vi) Add one column email of data type VARCHAR and size 30 to the table student. 1

Q8: Answer the question based on the table given below:


(a) To list the names all the patients admitted after 15/01/98. 1

(b) To list the names of female patients who are in ENT department. 1

(c) To list names of all patients with their date of admission in ascending order. 1

(d) To display Patient’s Name, Charges, Age for only female patients. 1

(e )Find Out the Output of Following SQL Command:-

(i) Select COUNT(DISTINCT charges) from HOSPITAL; 1


(ii) (ii) Select MIN(Age) from HOSPITAL where Sex="F"; 1

Q9 (a) What is the difference between math.abs() and math.fabs()?


Give Example. 2
(b) What is String? How do you create a string in Python? 2
(c) Write a program to check whether entered string is palindrome or not. 3
(d)Refer the following code and predict the output [4x1/2=2]

a=[1,2,3]
b=[4,5,6]
c=a*b
d=c[0:3]
e=d
a[5]=10
c[1]=20
e[0]=30
(i) Print e (ii) print a (iii) print d (iv) print c

e) Write a python program to receive the numbers from user through keyboard until user
gives 0 (to end the input process), then the program calculate and display the sum of given
odd numbers and even numbers respectively.

[4]

e.g.

if the user gives the following sequence of numbers:

7 5 10 143 911 12

Then the output should be as follows:

The Sum of even numbers in given input sequence = 36

The Sum of odd numbers in given input sequence = 35

You might also like