[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

In the Python statement x = a + 5 – b:

a and b are ________a + 5 - b is ________
  1. terms, a group
  2. operators, a statement
  3. operands, an expression
  4. operands, an equation

3 / 40

3.

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

a. Define

b. DEF

c. def

d. Def

4 / 40

4.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

5 / 40

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

6 / 40

6. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

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

a. 5

b. 3

c. 6

d. 7

12 / 40

12. Extension of all Python  Programme are .py

13 / 40

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

14 / 40

14.

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

15 / 40

15.

Choose the correct option with respect to Python.

A. Both tuples and lists are immutable.
B. Tuples are immutable while lists are mutable.
C. Both tuples and lists are mutable.
D. Tuples are mutable while lists are immutable.

16 / 40

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

17 / 40

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

18 / 40

18.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

19 / 40

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

20 / 40

20. python file can also run on command line

21 / 40

21. Bitwise operators are used to compare (binary) numbers

22 / 40

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

23 / 40

23. python has two primitive loop commands:

  • while loops
  • for loops

24 / 40

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

25 / 40

25. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

26 / 40

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

27 / 40

27.

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

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

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

31.

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

32 / 40

32. Comments starts with a #

33 / 40

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

34 / 40

34. A variable name cannot start with a number

35 / 40

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

36 / 40

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

37 / 40

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

38 / 40

38. A variable name must start with a letter or the underscore character

39 / 40

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

40 / 40

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

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.