Uploaded by hakirel928

12 CS

advertisement
MONARCH INTERNATIONAL SCHOOL - GHALUDI (SURAT)
Terminal Examination - I (2023-2024)
Grade :- XII
Date :- 13/10/2023
Subject :- Computer Science
Time :- 3 Hours
Marks :- 70
SECTION - A (Objective Part)
Q-1 Choose the correct option for the following questions:
1 . Which of the following can be used as valid variable identifier(s) in Python?
(a) 4thSum
(b) Total
(c) Number#
(d) _Data
2. The value of 3**2 is_____________.
(a) 6
(b) 3
(c) 2
(d) 9
3. An array elements can be accessed by using __________
(a) Value
(b) index
(c) base
(d) None
4. Merging is the process to _______________ two or more lists into a single.
(a) Combine
(b) separate
(c) both
(d) None
5. The pattern of interconnection of nodes in a network is_________________
(a) modem
(b) network
(c) topology
(d) None
6. The technique which convert digital signal to analogue form is known as _____________.
(a) Networking
(b) modulation
(c) topology
(d) None
7. __________________is used to connect your computer to a local data network.
(a) Network interface card (b) modulation
(c) modem
(d) None
8. _______________method reads the whole file at once.
(a) read()
(b) write()
(c) append()
(d) None
9. A set of operations which is a part of program and can be executed independently is called a
(a) Program
(b) function
(c) code
(d) None
10. How many values can be written by a function?
(a) One
(b) more than one
(c) less than ten
(d) None
(10*1=10)
SECTION - B (Subjective Part)
Q-2 Answer the following questions in very short: (Any 16)
(16*1=16)
1. One of the following, find those identifiers, which cannot be used for naming Variables or Functions in a Python
program: Price*Qty, class, For, do, 4thCol, totally, Row31, _Amount.
2. What is the library function?
3. Name the statement that sends back a value from a function.
4. What is the global variable?
5. How is method write () different from writelines() in Python?
6. Write an appropriate statement to go to the beginning of a file at any time.
7. Name the Python library modules which used to be imported to invoke the following functions:
(1) load()
(2) pow()
8. Observe the following code and answer the question that follows:
File= open("Mydata","a")
_______# Bank1
File.close()
(i) What type(text/binary) of file is Mydata?
(ii) fill the blank1 with statement to write "ABC" in the file "Mydata"
9. Define tell() function.
10. Distinguish between 'w' mode and 'a' mode.
11. Why array is called statistic data structure?
12. What is base address?
13. Correct the following code:
def count_to_ten():
for i in range [10]:
print (i)
count_to_ten ()
14. Find the output of the following:
for odd in [1, 3, 5, 7, 9]:
print (odd*odd, end=' ')
15. Name the function/method required to.
(i) check if a string contains only alphabets
(ii) give the total length of the list.
16. Daniel has to share data among various computer of his two or basic branches situated in the same city name the
network which is being form in his process
17. Name two communication channel for network.
18. What is ARPANET in computer network?
19. What is WWW? What is the purpose of MODEM?
Q-3 Answer the following questions in short: (Any 12)
(12*2=24)
1. What is dynamic type? give an example.
2. Differentiate between break and continue statements.
3. Differentiate between division operator (/) and floor division operator (//).
4. What is the difference between: (i) num = 10 and (ii) num = = 10?
5. Find the output of the following and justify the answer.
for i in range (2):
print (i, end= ' ')
for i in range(4,6):
print (i, end=' ')
6. Find and write the output of the following Python code:
Numbers [9,18,27,36]
for Num in Numbers:
for N in range(1, Num%9):
print(N, "#", end=" ")
print()
7. Rewrite the following Python program after removing all the syntactical errors (if any), underlining each
correction:
def checkval:
x= input("Enter a number")
if x % 2 =0:
print (x,"is even")
else if x<0:
print (x,"should be positive")
else;
print x,"is odd"
8. Write a function to find the sum of the series. 1+2+3+4+5+6+...... up to N terms.
9. Mention one difference between circular and start topology in networking.
10. Briefly mention two advantages and disadvantages of Ring topology in the network.
11. Mention one different between circuit switching and packet switching.
12. Write definition of a Method COUNTNOW (PLACES) to find and display those place names, in which there are
more than 5 characters. If the list PLACES contains
["DELHI","LONDON","PARIS", "NEW YORK","DUBAI"]
The following should get displayed
LONDON
NEW YORK
13. Differentiate between the following:
(i) f= open('dairy.txt', 'a')
(ii) f= open('dairy.txt', 'w')
14. Consider the following code:
f = open ("mytry", "w+")
f.write ("0123456789abcdef")
f.seek (-3, 2)// 1
printf.read(2) //2
Explain statement 1 and give output of 2.
15. What is the difference between LAN and MAN?
Q-4 Answer the following questions. (Any 5)
(5*4=20)
1. Write a program to swap two numbers without using third variable.
2. Write a program to print the following pattern:
*
**
***
****
*****
3. Write a program using while loop to print mathematical table of an input number.
4. The following number: (89 20 31 56 20 64 48) are required to be sorted using insertion short so how the list food
appear at the end of each?
5. Write a user defined function in Python that displays the number of lines starting with 'H' in the file Para1.txt.
Eg: if the file contains:
Whose woods these are I think I know. His house is in the village though;
He will not see me stopping here
To watch his woods fill up with snow.
Then the line count should be 2.
6. Ravya industries has set up new centre at Kaka Nagar for its office and web pages. The company compound has
four burning as shown in the diagram below:
Raj
Building
Fazz
Building
Harsh
Building
Jazz
Building
Centre to Centre distance between various buildings is as follows
Harsh building to Raj building
50 m
Raj building to Fazz building
60 m
Fazz building to Jazz building
25 m
Jazz building to Harsh building
170 m
Harsh building to Fazz building
125 m
Raj building to Jazz building
90 m
Number of computers in each of the building is as follows
Harsh building 15
Raj building
150
Fazz building
15
Jazz building
25
(a) Suggest a cable layout of concentration between the buildings.
(b) Suggest the most suitable place (i.e., building) to house the server of this organization with a suitable reason.
(c) Suggest the placement of the following devices with justification ;
(i)
Internet Connecting Device / Modem
(ii) switch
(d) The organization is planning to link its sale counter situated in various parts of the same city, which type
of network out of LAN, MAN or WAN will be formed? Justify your answer.
ALL THE BEST
Download