[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

2 / 40

2. Comments starts with a #

3 / 40

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

4 / 40

4.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

5 / 40

5. Who developed Python Programming Language?

6 / 40

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

7 / 40

7. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

8 / 40

8. Which keyword is used for function?
a) Fun
b) Define
c) Def
d) Function

9 / 40

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

10 / 40

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

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

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

16 / 40

16. Most recent major version of Python is Python 3

17 / 40

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

18 / 40

18. Operators are used to perform operations on variables and values

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

26. Python can connect to database systems.

27 / 40

27. Python relies on indentation?

28 / 40

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

  1. d = {"john":40, "peter":45}
  2. d["john"]

a) 40
b) 45
c) “john”
d) “peter”

29 / 40

29.

How to copy one list to another in python?

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

30 / 40

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

31 / 40

31. Python is an interpreted programming language

32 / 40

32.

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

33 / 40

33. Python has various versions available

34 / 40

34. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

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

35 / 40

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

36 / 40

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

37 / 40

37. What does the following code print?

x = -10if x < 0:    print("The negative number ",  x, " is not valid here.")print("This is always printed")
a.This is always printedb.The negative number -10 is not valid hereThis is always printedc.The negative number -10 is not valid here

38 / 40

38.

What will be the output of above Python code?

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

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

39 / 40

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

i = 1while True:    if i%3 == 0:        break    print(i)     i + = 1

a) 1 2
b) 1 2 3
c) error
d) none of the mentioned

40 / 40

40.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  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.