0% found this document useful (0 votes)
129 views2 pages

12th Chemistry Revision Exam 2024

Uploaded by

selvaufo
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)
129 views2 pages

12th Chemistry Revision Exam 2024

Uploaded by

selvaufo
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

PRIT~EDUCATION-SS PRITHVI-CLICK FOR MORE

[Link] [Link]

Reg No.:

COMMON FIRST REVISION EXAMINATION - 2024


Std - XII
Time: 3.00 Hours COMPUTER SCIENCE Marks: 70
Part I
Choose the best answer: 15 x 1 n 15
The variables in a function definition are called as
a) Subroutines b) Function c) Definition d) Parameters
2 Which one of the following is invalid?
a) Function definition which calls itself is called recursive function
b) Pure Function do not have any side effects
c) Definitions are distinct syntactic blocks

et
d) All functions are dynamic definitions
3 Which of the foilowing is constructed by placing expressions within parentheses?

i.N
a) Tuples b) Lists c) Classes d) quadrats
4 Which of the following refers the visibility of variables in one part of a program to
another part of the same program?
a) Scope b) Memory c) Address d) Accessibility

la
All members in a Python class are ..... by default
5
a) private b) protected c) public d) pure
sa
6 From the following sorting algorithms which algorithm needs the minimum number of
swaps?
a) Bubble sort b) Insetion sort c) Selection sort d) All the above
7 Which of the following character is used to give comments in Python Program?
da

a) # b) & c) @ d) S
8 What is the value of x**=2 when x = 2.5?
a) 5.0 b) 50.0 c) 6.25 d) 62.5
Pa

The condition in the if statement should be in the form of


a) Arithmetic or Relational expression b) Arithmetic or Logical expression
c) Relational or Logical expression d) Arithmetic
10. Read the following statement and choose the correct statement(s).
w.

0) in Python, you have to mention the specific data types while defining function.
(1) Python keywords cannot be used as function name.
a) l is correct and Il is wrong b) Both are correct ) I is wrong and Il is correct
ww

d) Both are wrong


11. Python :stops calling recursive function after calls by default
b) 1500 c) 2000 d) 3000
a) 1000
12 >>>str1='mammalis
>>>[Link]('ma') The output is
a) 0 b) 1 c) -1 d) 2
13. Pick odd one in connection with collection data type
a) List b) Tuple c) Dictionary d) Loop
14 The keys in a Python dictionary is separated by a
a) dot b) colon ) comma d) sermi colon
15 Which of the foilowing is the private class variable?
-a) num b) ##num c) $Snum d) &&num

Kindly send me your answer keys to us - [Link]@[Link]


PRIT~EDUCATION-SS PRITHVI-CLICK FOR MORE
[Link] [Link]
[Link]
Part - |
Answer any six Questions. [Link]. 24 is compulsory: 6 x 2=12
16. Differentiate interface and implementation.
What isa List? Give an example.
16. Why scope should be used for variable. State the reason.
19. What is sorting?
20. Write short notes on Tokens.
21. Write the syntax of if..else statement
22. Write the different types of function.
23. How will you delete a string in Python?
24. Write the output
class Odd_Even:
def check(sel, num):

et
if num%2==0:
print(num, is Even number"]

i.N
else:
s odd
number
Evenm,
neOdd
x=int(input("Enter a value: "))
[Link](x)
la Part - II
1. Answer any six questions. [Link]. 33 is Compulsory: 6 x3 = 18
sa
25. Which strategy is used for program designing? Define that Strategy
26. Define Global scope with an example
27. List the characteristics of an algorithm.
da

28. What are literals? Explain.


29, List the differences between break and continue statements.
30. DIfferentiate ceil() and floor() function?
Pa

31. Write a note about count() function in python.


32. What are the difference between List and Tuples?
-33. Wite a program to display all 4 digit even numbers.
Part - IV
w.

IV. Answer all the ques tions in detail: 5x5 =25


34. Explain with example Pure and impure functions. (OR)
How will you facilitate data abstraction? Explain it with suitable example.
ww

35. Write any Five Characteristics of Modules.


Explain the concept of Dynamic programming with suitable example
36. Explain input() and print() functions with examples.
(OR)
Write a program to display multiplication table for a given number.
37. Explain recursive function with an example.
(OR)
Explain about string operators in Python with suitable example.
38. What is nested tuple? Explain with an example
(OR)
Explain about constructor and destructor with suitable example

Kindly send me your answer keys to us - [Link]@[Link]

Common questions

Powered by AI

Global scope refers to variables defined at the top level of a program or module, making them accessible from any part of that program. Local scope refers to variables defined within a function or block, limiting their accessibility to that particular section. For example, a variable defined within a function is local and cannot be accessed outside, while a global variable can be accessed by any function within the program module .

A pure function is a function where the output value is determined only by its input values, without observable side effects. It always returns the same result given the same arguments, making it reliable and easy to test. On the other hand, an impure function may produce side effects besides returning a value, such as modifying a global variable or interacting with input/output operations. For example, a pure function might simply return the sum of two numbers, while an impure function might log data to a console or modify a database record .

The 'break' statement is used to exit a loop prematurely when a certain condition is met, effectively stopping further iterations of the loop. It is typically used when it's clear further execution is unnecessary or when searching for a condition is successful. The 'continue' statement, on the other hand, is used to skip the current iteration and proceed to the next iteration of the loop, often used for skipping over unwanted sections of data or results within loop operations .

A recursive function is a function that calls itself within its own definition. This feature allows the function to repeat its behavior a certain number of times or until a condition is met. Recursive functions are different from other functions due to this self-referential nature, which enables them to solve problems that exhibit recursive structure, such as computing factorials or traversing trees .

In Python, lists are mutable, meaning their contents can be changed (elements can be added, removed, or modified), which makes them suitable for collections of items that need to be modified. Tuples, on the other hand, are immutable, meaning once they are created, their contents cannot be changed. This immutability makes tuples useful for storing fixed collections of items, ensuring the data integrity of a dataset .

Nested tuples in Python refer to tuples that contain other tuples as elements. This type of nested structure is useful for representing multi-dimensional data and complex relational information, such as a matrix or a list of coordinate points. An example might involve using nested tuples to manage a seating chart for an event or storing pixel values for image processing tasks, where each tuple element represents different attributes or dimensions of the data .

Algorithms are characterized by their correctness, efficiency, and clarity. Correctness ensures that an algorithm accurately solves a problem for all inputs. Efficiency relates to how quickly and with what resources an algorithm solves a problem, typically assessed in terms of time and space complexity. Clarity ensures the algorithm is understandable and maintainable. These characteristics are essential because they determine how effectively and reliably an algorithm can be implemented and scaled in solving real-world problems .

The input() function in Python is used to capture user input from the console, allowing users to interact with a program by providing necessary data at runtime. The print() function is used to display output to the console, providing information, results, or feedback to the user. Together, these functions enable interaction between the user and the program, facilitating a dynamic exchange of information .

Sorting algorithms differ in their methodology for arranging data, thus varying in the number of swaps needed to achieve a sorted sequence. Bubble sort, for example, typically requires more swaps, as it repeatedly moves the largest unsorted element to its correct position, which involves multiple element swaps. On the other hand, selection sort generally requires fewer swaps because it selects the minimum element from the unsorted part each time and swaps it with the first unsorted element. The algorithm that minimizes swaps largely depends on the specific implementation and the initial configuration of the dataset .

Scope in programming refers to the context within which variables can be accessed or modified. It defines the visibility and lifetime of variables. A variable's scope determines if it is accessible outside the block where it is defined, which can be within a function, module, or class. This restricts unintended interference from other parts of the program and helps in managing memory efficiently by allowing variables to be discarded once they go out of scope .

You might also like