[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 is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned

2 / 40

2.

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

3 / 40

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

4 / 40

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

5 / 40

5.

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

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

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

9.

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

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

10 / 40

10. Extension of all Python  Programme are .py

11 / 40

11. A variable name cannot start with a number

12 / 40

12. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

13 / 40

13.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

14 / 40

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

15 / 40

15.

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

16 / 40

16.

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

17 / 40

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

18 / 40

18.

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

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

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

23. The elif keyword is pythons way of saying “if the previous conditions were not true, then try this condition”.

24 / 40

24. You have to use the same number of spaces in the same block of code, otherwise Python will give you an error

25 / 40

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

26 / 40

26.

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

27 / 40

27. Variable names are case-sensitive

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. You can return a range of characters by using the slice syntax

30 / 40

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

31 / 40

31. Python is a  high-level programming language.

32 / 40

32. Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location

33 / 40

33. The format() method takes the passed arguments

34 / 40

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

35 / 40

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

36 / 40

36.

What is the data type of print(type(0xFF))

37 / 40

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

38 / 40

38. Who developed Python Programming Language?

39 / 40

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

40 / 40

40. You can also use the remove() method to remove an element from the array

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.