[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. When does the else statement written after loop executes?

a) When loop condition becomes false

b) When break statement is executed in the loop

c) else statement is always executed

d) None of the above

2 / 40

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

3 / 40

3.

What will be the output of above Python code?

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

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

4 / 40

4.

 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.

5 / 40

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

6 / 40

6. python has two primitive loop commands:

  • while loops
  • for loops

7 / 40

7. Which keyword is used for function?
a) Fun
b) Define
c) Def
d) Function

8 / 40

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

9 / 40

9.

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.

10 / 40

10. Most recent major version of Python is Python 3

11 / 40

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

12 / 40

12.

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

a. 2

b. 3

c. 5

d. Multiple times

13 / 40

13.

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

14 / 40

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

15 / 40

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

16 / 40

16.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

17 / 40

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

18 / 40

18. Is there any comments in  following codes

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

 

19 / 40

19. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

20 / 40

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

21 / 40

21. You can also have an else without the elif

22 / 40

22. Comparison operators are not  used to compare two values

23 / 40

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

24 / 40

24.

What is the value of the expression 100 / 25?

  1. 4
  2. 4.0
  3. 0
  4. 25

25 / 40

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

26 / 40

26.

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

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

27 / 40

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

28 / 40

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

29 / 40

29.

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

30 / 40

30.

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

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

31 / 40

31. Python can be install on both  Linux and  Windows

32 / 40

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

33 / 40

33. + operator is used  to get output of multiple variables

34 / 40

34.

Which function overloads the >> operator?

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

35 / 40

35.

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

a. True

b. False

36 / 40

36. Which of the following is the use of function in python?
a) Functions are reusable pieces of programs
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

40. Variable names are case-sensitive

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.