[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. Comments starts with a #

3 / 40

3.

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

  1. False
  2. True

4 / 40

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

5 / 40

5. break in Python is used ______________

a) To restart a loop

b) Terminate a loop

c) To jump in between the loop

d) None of the above

6 / 40

6.

Which of the following statements assigns the value 25 to the variable x in Python:

  1. x ← 25
  2. x = 25
  3. x := 25
  4. int x = 25
  5. x << 25

7 / 40

7. Python can connect to database systems.

8 / 40

8.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

9 / 40

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

10 / 40

10.

Which one of the following is the correct extension of the Python file?

  1. .py
  2. .python
  3. .p
  4. None of these

11 / 40

11.

 Select the correct example of complex datatype in Python

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

12 / 40

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

13 / 40

13. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

14 / 40

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

15 / 40

15.

Which is the correct operator for power(xy)?

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

16 / 40

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

17 / 40

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

18 / 40

18.

Which keyword is used to begin the definition of a function?

a. Define

b. DEF

c. def

d. Def

19 / 40

19. You can also have multiple else statements on the same line:

20 / 40

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

21 / 40

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

22 / 40

22.

 What is output of: 35 == 35.0

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

23 / 40

23.

Write the output of the following code :

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

a. Weacome

b. Error

c. aWelcome

d. Welcomea

24 / 40

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

25 / 40

25. 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()

 

26 / 40

26.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

27 / 40

27. Variables that are created outside of a function

28 / 40

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

29 / 40

29.

What is the data type of print(type(10))

30 / 40

30. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

31 / 40

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

32 / 40

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

33 / 40

33. Pascal Case
Each word starts with a capital letter:

34 / 40

34. The format() method takes the passed arguments

35 / 40

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

36 / 40

36. A variable name cannot start with a number

37 / 40

37.

Python considered the character enclosed in triple quotes as String.(T/F)

a. True

b. False

38 / 40

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

39 / 40

39.

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

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

40 / 40

40.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

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