[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. You can have if statements inside if statements, this is called nested if statements.

3 / 40

3.

l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?

  1. List
  2. Tuple
  3. Set
  4. None of these

4 / 40

4.

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.

5 / 40

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

6 / 40

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

7 / 40

7.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

8 / 40

8.

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

9 / 40

9.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

10 / 40

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

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

14. We can combine strings and numbers by using the format() method

15 / 40

15.

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

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

16 / 40

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

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

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

17 / 40

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

18 / 40

18.

Which statement is correct?

A. List is immutable && Tuple is mutable
B. List is mutable && Tuple is immutable
C. Both are Mutable.
D. Both are Immutable

19 / 40

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

20 / 40

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

21 / 40

21. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

22 / 40

22.

Which of the following statement will execute in last?

def s(n1): #Statement 1      print(n1) #Statement 2n2=4 #Statement 3s(n2) #Statement 4

a. Statement 1

b. Statement 2

c. Statement 3

d. Statement 4

23 / 40

23. Python has various versions available

24 / 40

24.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

29. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

30 / 40

30. Comments can be used to explain Python code.

31 / 40

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

32 / 40

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

33 / 40

33. Who developed Python Programming Language?

34 / 40

34. Comments can be used to make the code more readable.

35 / 40

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

 

36 / 40

36. Python allows you to extract the values into variables.

37 / 40

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

38 / 40

38. What will be the output of the following Python code?

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

39 / 40

39. python file can also run on command line

40 / 40

40. Most recent major version of Python is Python 3

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.