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

harshit com sc

Uploaded by

Harsh Dubey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
22 views2 pages

harshit com sc

Uploaded by

Harsh Dubey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

C.D.A. ACADEMY SR. SEC.

SCHOOL MATHAULI BANKATI BASTI


TERM-1 (2023-24)
CLASS-XIITH SUB- COMPUTER SCIENCE (083)
TIME- 3 HRS. M.M. – 70
SECTION A (1X18=18)
1. (b) sequence statements 2. True 3. (a) True 4. (c) ** 5. Error 6. (a) a+
7. (a) list 8. (d) ‘ab+’ 9. (b) tells the current position of the file pointer within the file
10. (d) Both a and c

1. all the instructions are executed one after another in


(a) Selection statements (b) sequence statements (c) looping statements (d) None
2. State True or False
“String can be assigned using a single quotes, double quotes or triple quotes.”
3. Consider the given expression:
not True and False or True
Which of the following will be correct output if the given expression is evaluated?
(a) True (b) False (c) NONE (d) NULL
4. Identify the valid arithmetic operator in Python from the following.
(a) ? (b) < (c) ** (d) and
5. If the following code is executed, what will be the output of the following code?
name="ComputerSciencewithPython"
print(name.replace [‘C’,’@’])
6. Which of the following mode is used when we want to read data from the file or append the data into the same file?
(a) a+ (b) r+ (c) w+ (d) None of the above
7. Consider a declaration L = ["red", "blue", "green"]. Which of the following represents the data type of L?
(a) list (b) tuple (c) dictionary (d) string
8. Which of the following options can be used to Open a file for appending and read-only mode in the binary
format?
(a) ‘wb’ (b) ‘rb’ (c) ‘rb+’ (d) ‘ab+’
9. What is the significance of the file.tell()method?
(a) tells the path of file
(b) tells the current position of the file pointer within the file
(c) tells the end position within the file
(d) checks the existence of a file at the desired location
10. Which of the following components are parts of a function header in Python?
(a) Function Name (b) Return Statement (c) Parameter List (d) Both a and c
11. State True or False-
“Python stack can be implemented using deque class from collections module”
12. Get the number of items in the stack-
(a) isEmpty() (b) getSize() (c) peek() (d) None
13. Identify the output of the following Python statements.
n = 10
for i in range(1,n-1):
print (i)
(a) 1 2 3 4 5 6 (b) 1 2 3 4 5 6 7 (c) 1 2 3 4 5 6 7 8 (d) 1 2 3 4 5 6 7 8 9
14. Identify the output of the following Python statements.
s='Congratulations'
print(s.split('ra',4))
15. Write the output of the following python code:
def SI(p,r=10,t=5):
return(p*r*t/100)
print(SI(20000,5))
16. What do you understand by the term Iteration?

17. Write the output of the following python code:


color = ["red", "blue", "green"]
print(color)
color[0] = "pink"
color[-1] = "orange"
print(color)

18. Write the meaning of methods: istitle()

SECTION B (3X8=24)

19. What is a Sequence statements and Selection Statements.


20. Write the meaning of methods:
(i) isalnum() (ii) isspace()

21. Define From statement with example.


22. Define Implementation using list.
23. Write a program to input any number and to find sum of all natural numbers up to given number.
24. Write a program to input any number and to find reverse of that number.
25. Define Parameters and Arguments.
26. Write the 6 Keywords Name.

SECTION C (4X7=28)

27. Write the program-


(a) Write or append in file: Open the file "demofile2.txt" and append content to the file.
(b) Open the file "demofile3.txt" and overwrite the content.

28. What is a Mutable and Immutable objects in python?


29. What is a PUSH and POP operation in Stack? Write short description with figure.
30. Define Built In Function with example in Python.

31. Write a program to input any choice and to implement the following. Choice Find-
1. Area of square 2. Area of rectangle.
32. Write short notes on File handling.
33. What is a string in python? Write short description.

You might also like