[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. An example of an illegal character is a double quote inside a string that is surrounded by double quotes

2 / 40

2. Python can connect to database systems.

3 / 40

3.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

4 / 40

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

5 / 40

5. Camel Case
Each word, except the first, starts with a capital letter:

6 / 40

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

7 / 40

7.

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

a. True

b. False

8 / 40

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

9 / 40

9. Variable names are case-sensitive

10 / 40

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

11 / 40

11.

Which of the following creates a tuple?

A. tuple1=(“a”,”b”)
B. tuple1[2]=(“a”,”b”)
C. tuple1=(5)*2
D. None of the above

12 / 40

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

13 / 40

13. Variables that are created outside of a function

14 / 40

14.

What will be the output of below Python code?

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

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

15 / 40

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

16 / 40

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

17 / 40

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

18 / 40

18.

 What is output of: 35 == 35.0

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

19 / 40

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

20 / 40

20. Is there any comments in  following codes

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

 

21 / 40

21.

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

a. Define

b. DEF

c. def

d. Def

22 / 40

22.

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

23 / 40

23. An array is a special variable, which can hold more than one value at a time

24 / 40

24. An array can hold many values under a single name

25 / 40

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

26 / 40

26.

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

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

27 / 40

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

28 / 40

28. Suppose t = (1, 2, 4, 3), which of the following is incorrect?
a) print(t[3])
b) t[3] = 45
c) print(max(t))
d) print(len(t))

29 / 40

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

30 / 40

30.

 Select the correct example of complex datatype in Python

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

31 / 40

31.

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

32 / 40

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

33 / 40

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

34 / 40

34.

How to copy one list to another in python?

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

35 / 40

35. You can have if statements inside if statements, this is called nested if statements.

36 / 40

36. Strings in python are surrounded by either single quotation marks, or double quotation marks

37 / 40

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

38 / 40

38. Comments starts with a #

39 / 40

39.

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.

40 / 40

40. Who developed Python Programming Language?

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.