What will be the output for the following python code
(Kolathur-Maduravoyal-Mathur-Perambur-Surapet-Madurantakam-Rajamangalam-Paruthipattu) def cube (X): CLASS XII REVISION EXAMINATION-II MARKS: 70 X=X+2 DATE:27.11.2024 COMPUTER SCIENCE TIME: 3 HRS return X ** 3 SECTION-A (21x1=21) X = cube ( 5) 1. Which of the following is equivalent to random. randint(3, 6)? print( X) a) random.choice([3, 6]) b) random.randrange(3, 6) 13. _______ protocol provides access to command line interface on a remote c) 3 + random.randrange(3) d) 3 + random.randrange(4) computer. 2. Which of the following will you suggest to establish the online face to face a) FTP b) PPP c) Telnet d) SMTP communication between the people in the Regional Office Ernakulum and Delhi 14. What is the output of the below program? Headquarter? def power(x, y=2): a) Cable TV b) Email c) Text chat d) Video Conferencing r=1 3. The ______ topology has a central line and all nodes are connected to it. for i in range(y): 4. Which protocol is used for transferring files over a TCP/IP network? r=r*x a) FTP b) SMTP c) HTTP d) SLIP return r 5. Which of these components is internal to a computer and is required to connect print(power(3), end = ‘ ‘) the computer to a network? print(power(3, 3)) a) Wireless access point. b) Network interface card a) 212 32 b) 9 27 c) 567 98 d) None of the mentioned c) Switch d) Hub 15. ______ is a device that connects dissimilar networks. 6. A device that connects the network cable to the NIC is ______ 16. Among the following service available on the World Wide Web are? a) RJ45 b) Repeater c) Hub d) Switch i) Email ii) HTML iii) XML iv) Video conferencing 7. Pushing an element into stack already having five elements and stack size of 5, a) (i) and (ii) b) (i) and (iv) then stack becomes c) (ii) and (iii) d) None of the above a) Overflow b) Crash c) Underflow d) User flow 17. _________ is a computer software capable of requesting, receiving & displaying 8. Which of the following is used to receive e-mails over internet? information in the form of webpages. a) SMTP b) POP3 c) PPP d) VoIP a) Web Servers b) Web Browsers 9. Which switching technique follows the store and forward mechanism? c) Web Designers d) Web Camera a) Circuit switching b) Message switching 18. Mr. John is a small businessman who runs Hardware. He has been experiencing c) Packet switching d) All of these problems with his small accounting department, which he depends on to provide 10. Two friends have connected their computers, but are getting weak signals. Which sales reports. Mr. John wants to share information between his 7 computer stations device need to be used to get better signals? and have one central printing area. What type of network would you recommend to a) Repeater b) Switch c) Modem d) Hub Mr. John? 11. State True or False : The star topology ensures that the network will work even a) LAN b) PAN c) MAN d) WAN when a node fails. 19. ________ is used for point-to-point communication or unicast communication such as radar and satellite. a) INFRARED WAVES b) BLUETOOTH import random c) MICROWAVES d) RADIOWAVES heights=[10,20,30,40,50] Q20 and Q21 are ASSERTION AND REASONING based questions. Mark the correct begin=random.randint(0,2) choice as end=random.randint(2,4) a) Both A and R are true and R is the correct explanation for A for x in range(begin,end): b) Both A and R are true and R is not the correct explanation for A print(heights*x+,end=’@’) c) A is True but R is False a) 30 @ b) 10@20@30@40@50@ c) 20@30 d) 40@30@ d) A is false but R is True ii) What is the use of Modem? 20. Assertion (A):- If the arguments in a function call statement match the number and order of arguments as defined in the function definition, such arguments are 26. Explain the difference between Local and global variables with an example. called positional arguments. 27. Write a function modilst(L) that accepts a list of numbers as argument and Reason (R):- During a function call, the argument list first contains default increases the value of the elements by 10 if the elements are divisible by 5. Also write argument(s) followed by positional argument(s). a proper call statement for the function. 21. Assertion : The tree topology is a hybrid topology created through a combination For example: of Bus and Star topologies. If list L contains [3,5,10,12,15] Reason : In tree topologies, at a time either bus topology transmission is followed or Then the modilist() should make the list L as [3,15,20,12,25] star topology transmission takes place but never both. 28. Differentiate between Bus and Star topology with its features.
SECTION-B (7x2= 14) SECTION-C (3x3=9)
22. Write a function in python push(player) where the player is a dictionary 29. Explain types of Networks based on Component Roles. containing the details of -{gamename : playername} 30. Explain the types of switching techniques. The function should push the name of those players into the stack where the name 31. Expand the following: starts with the letter 'R'. Also display the count of element pushed into the stack a) IMAP For example: b) SLIP Players = {'cricket' : 'RahulDravid', 'chess': 'R pragananda', 'kho_kho':'Sarika kale', c) GPRS 'kabaddi':'Pradeep Narwal'} d) URL The stack should contain: e) WLL Rahul Dravid f) MAN R pragananda 23. What is the difference between XML and HTML? SECTION-D (4x4= 16) 24. Write the advantages and disadvantages of Radio waves.. 32. Write a short note on any two types of guided media and list its advantages and 25. What possible outputs(s) are expected to be displayed on screen at the time of disadvantages. execution of the program from the following code? Also specify the maximum values 33. a) Write a function in Python PUSH(pbook),where pbook is a dictionary of phone that can be assigned to each of the variables BEGIN and END. book(name and mobile numbers), from this dictionary push all phone numbers of persons whose name contains the letter ‘a’ in their names to a stack implemented by using list and also the display the stack if it has at least one element, otherwise SECTION-E (2x5=10) display “stack empty” message 36. a) Find the output of the following: (2m) >>>mydict={"Shyam":9999123123,"Veena:8888345345, "Minu":9999123123, def anher(x,y=10): "Tejas":7777678678} x=x/y >>> push(mydict) y=x%y Stack elements after push operation : return x [9999123123, 7777678678] m=200 b) What is the purpose of Domain Name System? (1m) n=20 34. a) Predict the output of the Python code given below: (2m) m=anher(m,n) print(m,n,sep="#") n=anher(n) print(m,n,sep="#",end="$$$")
b) A list contains following record of a doctor: (3m)
[Doc_ID, Doc_name, Phone number, Speciality] Write the following user defined functions to perform given operations on the stack named "status": (i) Push element() - To Push an object containing Doc ID and Doc_name of doctors who specialize in Anesthesia to the stack. b) Write the output of the code given below: (2m) (ii) Pop_element() - To Pop the objects from the stack and display them. Also, display def short_sub (lst,n): "Stack Empty" when there are no elements in the stack. for i in range (0,n): For example: If the lists of Doctors' details are: if len (lst)>4: ['D01', "Gurdas", "99999999999", "Anesthesia"] lst [i]= lst [i]+lst[i] ["D02", "Julee", "8888888888", "cardiology"] else: [D03", "Murugan", "77777777777", "Anesthesia"] lst[i]=lst[i] ["D04", "Ashmit", "1010101010", "Medicine"] subject= ['CS', 'HINDI', 'PHYSICS', 'CHEMISTRY', 'MATHS'] The stack should contain short_sub (subject, 5) ['D03', 'Murugan'] print (subject) ['D01', 'Gurdas] 35. Define the terms: The output should be: a) Bandwidth [D03', 'Murugan'] b) Hub ['D01', 'Gurdas] c) Interspace Stack Empty d) TCP/IP 37. Expertia Professional Global (EPG) in an online corporate training provider (i) Suggest the most appropriate building, where EPG should plan to install the company for IT related courses. The company is setting up their new campus in server. Mumbai. You as a network expert have to study the physical locations of various (ii) Suggest the most appropriate building to building cable layout to connect all three buildings and the number of computers to be installed. In the planning phase, buildings for efficient communication. provide the best possible answers for the queries (i) to (v) raised by them. (iii) Which type of network out of the following is formed by connection the Physical locations of the buildings of EPG computers of these three buildings? (a) LAN (b) MAN (c) WAN (iv) Suggest the placement of the following devices with justification: (a) Switch (b) Repeater (v) Write the use of Modem in a network.