[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Official site of python is www.python.org

2 / 40

2. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

3 / 40

3. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

4 / 40

4. Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location

5 / 40

5. You can also use the remove() method to remove an element from the array

6 / 40

6. You can have if statements inside if statements, this is called nested if statements.

7 / 40

7. An array can hold many values under a single name

8 / 40

8. You can return a range of characters by using the slice syntax

9 / 40

9. Variables that are created outside of a function

10 / 40

10. You can use the pop() method to remove an element from the array

11 / 40

11. The for loop in Python is an _____________

a) Entry Controlled Loop

b) Exit Controlled Loop

c) Both of the above

d) None of the above

12 / 40

12. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

13 / 40

13.

What will be the output of below Python code?

str1="Information"print(str1[2:8])

A. format
B. formatio
C. orma
D. ormat

14 / 40

14. print() function is often used to output variables.

15 / 40

15. Variable names are case-sensitive

16 / 40

16. Pip is  not a powerful package management system for Python software packages

17 / 40

17. Which of the following is the correct extension of the Python file?

18 / 40

18. Comments starts with a #

19 / 40

19. python file can also run on command line

20 / 40

20. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

21 / 40

21. Extension of all Python  Programme are .py

22 / 40

22.

Which of the following is not a keyword in Python language?

  1. val
  2. raise
  3. try
  4. with

23 / 40

23.

Which of the following is False?

A. String is immutable.
B. capitalize() function in string is used to return a string by converting the whole given string into uppercase.
C. lower() function in string is used to return a string by converting the whole given string into lowercase.
D. None of these.

24 / 40

24. Comments can’t be used to prevent execution when testing code.

25 / 40

25.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

26 / 40

26. The length of an array is always one more than the highest array index.

27 / 40

27.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

28 / 40

28.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

29 / 40

29. With the break statement we can stop the loop even if the while condition is true

30 / 40

30. Arrays are used to store multiple values in one single variable.

31 / 40

31. Python  was created by Guido van Rossum, and released in 1999.

32 / 40

32. Arithmetic operators are used with numeric values to perform common mathematical operations

33 / 40

33. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

34 / 40

34. To write and execute code in python, we first need to install Python on our system

35 / 40

35. Comments can be used to explain Python code.

36 / 40

36.

In a program, a function can be called ____________ times.

a. 2

b. 3

c. 5

d. Multiple times

37 / 40

37. You can use three double quotes only:

a = “””Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.”””
print(a)

38 / 40

38.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

39 / 40

39. An array is a special variable, which can hold more than one value at a time

40 / 40

40. python has two primitive loop commands:

  • while loops
  • for loops

Exit



[hurrytimer id=”2250″]
[wooct_product]

Wrong shortcode initialized


You must log in to see your results.



Wrong shortcode initialized


There are no questions atteched yet.





[ays_quiz_leaderboard id=”Your_Quiz_ID” from=”Y-m-d H:i:sa” to=”Y-m-d H:i:s”]

Category:


Wrong shortcode initialized


[WATU 1]

You must log in to see your results.