[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

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

a. Define

b. DEF

c. def

d. Def

2 / 40

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

3 / 40

3.

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.

4 / 40

4.

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

5 / 40

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

6 / 40

6. Python can connect to database systems.

7 / 40

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

8 / 40

8.

What will be the output of below Python code?

tupl=([2,3],"abc",0,9)tupl[0][1]=1print(tupl)A. ([2,3],"abc",0,9)B. ([1,3],"abc",0,9)C. ([2,1],"abc",0,9)D. Error

9 / 40

9. Arithmetic operators are used with numeric values to perform common mathematical operations

10 / 40

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

11 / 40

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

12 / 40

12.

Function defined to achieve some task as per the programmer’s requirement is called a ___________

a. user defined function

b. library function

c. built in functions

d. All of the above.

13 / 40

13. Python is an interpreted programming language

14 / 40

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

15 / 40

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

16 / 40

16.

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

17 / 40

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

18 / 40

18. The length of an array is always one more than the highest array index.

19 / 40

19.

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

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

20 / 40

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

21 / 40

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

22 / 40

22.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

23 / 40

23.

What will be the output of below Python code?

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

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

30. Python relies on indentation?

31 / 40

31. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

32 / 40

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

33 / 40

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

34 / 40

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

35 / 40

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

36 / 40

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

37 / 40

37. Comments starts with a #

38 / 40

38. Is there any comments in  following codes

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

 

39 / 40

39.

Which function overloads the >> operator?

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

40 / 40

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

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.