[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

What is the value of the expression 100 / 25?

  1. 4
  2. 4.0
  3. 0
  4. 25

2 / 40

2. Python relies on indentation?

3 / 40

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

4 / 40

4. The len() method to return the length of an array

5 / 40

5. To insert characters that are illegal in a string, use an escape character

6 / 40

6.

How to copy one list to another in python?

A. l1[] = l2[]
B. l1[] = l2
C. l1[] = l2[:]
D. l1 = l2

7 / 40

7.

 Select the correct example of complex datatype in Python

  1. 3 + 2j
  2. -100j
  3. 5j
  4. All of the above are correct

8 / 40

8. Comments can be used to explain Python code.

9 / 40

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

10 / 40

10. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

11 / 40

11. You can also have an else without the elif

12 / 40

12. All keywords in Python are in _________
a) Capitalized
b) lower case
c) UPPER CASE
d) None of the mentioned

13 / 40

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

14 / 40

14. Which of the following is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned

15 / 40

15. + operator is used  to get output of multiple variables

16 / 40

16.

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

a. 2

b. 3

c. 5

d. Multiple times

17 / 40

17. The format() method takes the passed arguments

18 / 40

18. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

19 / 40

19. You have to use the same number of spaces in the same block of code, otherwise Python will give you an error

20 / 40

20.

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

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

21 / 40

21. Python will give you an error if you skip the indentation

22 / 40

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

23 / 40

23. Find the output of the following program segments:

for i in range(20,30,2):

print(i)

a) 20 22 24 26 28

b) 20

22

24

26

28

c) 20 22 24 26 28 30

d) 20

22

24

26

28

30

24 / 40

24. Python has various versions available

25 / 40

25.

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

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

26 / 40

26.

What will be the output of below Python code?

str1="poWer"str1.upper()print(str1)

A. POWER
B. Power
C. power
D. poWer

27 / 40

27.

 ____________________ 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

28 / 40

28. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

29 / 40

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

30 / 40

30. Who developed Python Programming Language?

31 / 40

31. During Installation Make sure to select both the checkboxes at the bottom .

32 / 40

32. Python can be used on a server to create web applications?

33 / 40

33. Python is an interpreted programming language

34 / 40

34.

Which is the correct operator for power(xy)?

  1. X^y
  2. X**y
  3. X^^y
  4. None of the mentioned

35 / 40

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

36 / 40

36.

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.

37 / 40

37. What is the output of the given below program?

if 3 + 4 == 7:    print("Hi")else:    print("Know Program")print("Hello")

a) Hi
b) Know Program

c)
Hi
Hello

d)
Know Program
Hello

38 / 40

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

39 / 40

39. Bitwise operators are used to compare (binary) numbers

40 / 40

40.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

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.