[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

2 / 40

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

3 / 40

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

4 / 40

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

5 / 40

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

6 / 40

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

7 / 40

7.

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

8 / 40

8.

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

a. 2

b. 3

c. 5

d. Multiple times

9 / 40

9. The else keyword catches anything which isn’t caught by the preceding conditions.

10 / 40

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

11 / 40

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

12 / 40

12. To write and execute code in python, we first need to install Python on our system

13 / 40

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

14 / 40

14.

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

a. True

b. False

15 / 40

15.

 What is output of: 35 == 35.0

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

16 / 40

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

17 / 40

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

18 / 40

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

19 / 40

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

20 / 40

20. Who developed Python Programming Language?

21 / 40

21. Variable names are case-sensitive

22 / 40

22. Python can be install on both  Linux and  Windows

23 / 40

23.

 Select the correct example of complex datatype in Python

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

24 / 40

24. python file can also run on command line

25 / 40

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

26 / 40

26.

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

27 / 40

27.

What will be the output of below Python code?

str1="Information"print(str1[2:8])

A. format
B. formatio
C. orma
D. ormat

28 / 40

28. Is there any comments in  following codes

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

 

29 / 40

29. Python has a set of built-in methods that you can use on lists/arrays

30 / 40

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

31 / 40

31.

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

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

32 / 40

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

33 / 40

33. Variables that are created outside of a function

34 / 40

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

a) for

b) while

c) Both (a) and (b)

d) None of the above

35 / 40

35. Extension of all Python  Programme are .py

36 / 40

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

37 / 40

37. Most recent major version of Python is Python 3

38 / 40

38. What is the index value of ‘i’ in string “Learning”

a. 5

b. 3

c. 6

d. 7

39 / 40

39.

How to copy one list to another in python?

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

40 / 40

40. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

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.