[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

The most important object defined in NumPy is an N-dimensional array type called?

A. ndarray
B. narray
C. nd_array
D. darray

3 / 40

3. Python can be used to handle big data and perform complex mathematics.

4 / 40

4. Find and write the output of the following python code:

x = “abcdef”

i = “a”

while i in x:

print(i, end = ” “)

a) a

b) a a a a a a

c) a a a a a a … infinite times

d) Code will generate error

5 / 40

5.

What will be the output of above Python code?

str1="6/4"print("str1")

A. 1
B. 6/4
C. 1.5
D. str1

6 / 40

6. Indentation refers to the spaces at the beginning of a code line.

7 / 40

7. 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

8 / 40

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

9 / 40

9.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

10 / 40

10. The list’s remove() method only removes the first occurrence of the specified value.

11 / 40

11.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

12 / 40

12. Python is a  high-level programming language.

13 / 40

13. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

14 / 40

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

15 / 40

15. With the for loop we can execute a set of statements

16 / 40

16. Who developed Python Programming Language?

17 / 40

17. With the break statement we can stop the loop before it has looped through all the items

18 / 40

18.

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

a. 2

b. 3

c. 5

d. Multiple times

19 / 40

19.

Write the output of the following code :

str = "Welcome"str[2] = 'a'print(str)

a. Weacome

b. Error

c. aWelcome

d. Welcomea

20 / 40

20. X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use?

a) while Choice == Answer:

Choice = input()

b) while Choice != Answer:

Choice = input()

c) while Answer != Choice:

Choice = input()

d) while Answer =! Choice:

Choice = input()

 

21 / 40

21.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

22 / 40

22. You can use the append() method to add an element to an array

23 / 40

23. Python can be install on both  Linux and  Windows

24 / 40

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

25 / 40

25. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3])
b) t[3] = 45
c) print(max(t))
d) print(len(t))

26 / 40

26. Snake Case
Each word is separated by an underscore character:

27 / 40

27. The format() method takes unlimited number of arguments

28 / 40

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

29 / 40

29. The for loop does not require an indexing variable to set beforehand

30 / 40

30. Comments can be used to explain Python code.

31 / 40

31.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

32 / 40

32. Python can be treated in a procedural way, an object-oriented way or a functional way.

33 / 40

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

34 / 40

34. A variable name can only contain alpha-numeric characters and
underscores

35 / 40

35. Camel Case
Each word, except the first, starts with a capital letter:

36 / 40

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

37 / 40

37.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

38 / 40

38. The elif keyword is pythons way of saying “if the previous conditions were not true, then try this condition”.

39 / 40

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

40 / 40

40. You can also have an else without the elif

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.