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

1st Year-Computer Science and Entrep. (SNC) - Computer 11

This document is an examination paper for 1st Year Computer Science students at Scholars Academy Harnoli, consisting of multiple-choice questions related to Python programming. The paper has a total duration of 40 minutes and is worth 30 marks, with questions covering topics such as Python syntax, functions, and programming concepts. Students are required to select the correct option for each question to demonstrate their understanding of Python.
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)
5 views2 pages

1st Year-Computer Science and Entrep. (SNC) - Computer 11

This document is an examination paper for 1st Year Computer Science students at Scholars Academy Harnoli, consisting of multiple-choice questions related to Python programming. The paper has a total duration of 40 minutes and is worth 30 marks, with questions covering topics such as Python syntax, functions, and programming concepts. Students are required to select the correct option for each question to demonstrate their understanding of Python.
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

SCHOLARS ACADEMY HARNOLI

City Road Harnoli Ph: 03077902700

Student Name: Class: 1st Year

Computer Science and


Paper Type: G Subject:
Entrep. (SNC)

Paper Time: 40 Mimutes Maximum Marks: 30

Q1. Choose the correct option. (8X1=8)

1. An action needed during Python installation to run from the command line more easily:

(A) Uncheck "Add Python to PATH" (B) Choose a different IDE (C) Check "Add Python to PATH" (D) Install only the IDE

2. A valid variable name in Python is

(A) variable 1 (B) 1variable (C) variable-name (D) variable name

3. Output of the below code is:

age = 25; print("Age:", age)

(A) Age: 25 (B) 25 (C) Age (D) age

4. The operator is used for exponentiation in Python is:

(A) * (B) ** (C) // (D) /

5. A loop used to iterate over a collection such as lists is:

(A) while (B) for (C) do-while (D) repeat

6. A keyword is used to define a function in Python:

(A) define (B) function (C) def (D) func

7. The output of the following code is:

temperature, humidity, wind_speed = 25, 60, 15 print("Hot and humid" if temperature > 30 and humidity > 50 else "Warm and breezy" if

temperature == 25 and wind_speed > 10 else "Cool and dry" if temperature < 20 and humidity < 30 else "Moderate")

(A) Hot (B) Warm and breezy (C) Cool (D) Nothing

8. The operation used to combine two lists in Python:

(A) combine() (B) concat() (C) + (D) merge()

Q2. Choose the correct option. (22X1=22)

1. Who is the creator of the Python programming language?

(A) Brendan Eich (B) James Gosling (C) Guido van Rossum (D) Bjarne Stroustrup

2. Why is the file extension for Python files?

(A) .py (B) .pyt (C) .python (D) .ptn

3. Python is widely used in web development. Which of the following is a popular web framework for Python?

(A) React (B) Django (C) Angular (D) Laravel

4. What does the acronym IDLE stand for in the context of Python?

(A) Integrated Development and (B) Interactive Development (C) Integrated Data Language (D) Interactive Debugging Learning
learning Environment Learning Environment Environment Environment

5. Which quality of Python helps beginners focus more no logic than on syntax?

(A) Special symbols (B) English-like syntax (C) Complex grammar (D) Compiler speed

6. How does Python treat the two variables: Age and age?

(A) Same variables (B) Both are ignored (C) Treated differently (D) Syntax error

7. Why are comments important in Python programming?

(A) They increase speed (B) They confuse the code (C) They explain code (D) They are required

8. Which line correctly takes a floating-point number as input?

(A) float(input("Enter price: ")) (B) input(float("Enter price: ")) (C) float("Enter price: ") (D) Price = input(float)

9. In Python, which keyword is reserved and cannot be used as a variable name?

(A) input (B) print (C) while (D) age

10. Which statement shows correct output usage in Python?

(A) echo("Hi") (B) print("Hi") (C) say("Hi") (D) message("Hi")

11. How can you print multiple values in a single line separated by spaces using the print() function?

(A) print("value1", "value2") (B) print("value1" + "value2") (C) print("value1"; "value2") (D) print("value1", "value2", sep=",")

12. Which of these gives True only when both conditions are True?

(A) or (B) not (C) and (D) ==

13. Which of the following code will give output 3?

(A) print(10 / 3) (B) print(10 % 3) (C) print(10 // 3) (D) print(3 * 1)

14. Which is the correct order of operator precedence (highest to lowest)?

(A) (), **, *, + (B) **, (), *, + (C) *, (), +, ** (D) +, *, **, ()

15. Which statement is used to combine conditions in decision making?

(A) Logical operators (B) Arithmetic operators (C) Input/output functions (D) Assignment operators

16. What will be the result of the following code?

a = 12 # Binary: 1100

b = 7 #Binary: 0111

result = a ^ b

print(result)

(A) 3 (B) 15 (C) 5 (D) 7

17. What will be the output of the following code?

a=7

b=7

c=8

result = a < b < c

print(result)

(A) True (B) False (C) Error (D) None


18. What will this code output?

x=5

if x > 0:

print("Positive")

elif x == 0:

print("zero")

else:

print("Negative")

(A) Positive (B) Zero (C) Negative (D) Error

19. Which decision-making statement checks only one condition?

(A) for (B) if (C) elif (D) while

20. Which is the correct short-hand form to check if a number is odd?

(A) print("Odd" if num % 2 != 0 else (B) if num % 2 != 0 print("Odd") (C) num % 2 == 1 then print("Odd") (D) print("Even" if num % 2 == 0 or
"Even") "Odd")

21. How does Python decide which elif block to run?

(A) It checks all and runs all true (B) Only the last one is checked (C) The first true condition runs (D) None are checked if is false
ones

22. Which one helps handle opposite actions based on a condition?

(A) elif (B) else only (C) if-else (D) while loop

You might also like