[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

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

3 / 40

3.

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

a. True

b. False

4 / 40

4.

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

5 / 40

5.

What will be the output of above Python code?

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

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

6 / 40

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

7 / 40

7.

 Select the correct example of complex datatype in Python

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

8 / 40

8.

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

9 / 40

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

a. 5

b. 3

c. 6

d. 7

10 / 40

10.

What will be the output of below Python code?

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

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

11 / 40

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

12 / 40

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

13 / 40

13. Which of the following loop is not supported by the python programming language?

a) for loop

b) while loop

c) do…while loop

d) None of the above

14 / 40

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

15 / 40

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

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.

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

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

18 / 40

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

19 / 40

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

20 / 40

20. Snake Case
Each word is separated by an underscore character:

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. Operators are used to perform operations on variables and values

23 / 40

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

24 / 40

24. All keywords in Python are in _________
a) Capitalized
b) lower case
c) UPPER CASE
d) None of the mentioned

25 / 40

25. What keyword would you use to add an alternative condition to an if statement?

a) else if
b) elseif
c) elif
d) None of the above

26 / 40

26. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
d) None of the above

27 / 40

27. Who developed Python Programming Language?

28 / 40

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

29 / 40

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

30 / 40

30. Official site of python is www.python.org

31 / 40

31. Python can connect to database systems.

32 / 40

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

33 / 40

33. Comparison operators are not  used to compare two values

34 / 40

34. Is there any comments in  following codes

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

 

35 / 40

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

36 / 40

36.

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

a. 2

b. 3

c. 5

d. Multiple times

37 / 40

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

38 / 40

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

39 / 40

39.

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

40 / 40

40.

 Which of the following statement is False?

  1. Variable names can be arbitrarily long.
  2. They can contain both letters and numbers.
  3. Variable name can begin with underscore.
  4. Variable name can begin with number.

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.