[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

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

a. True

b. False

3 / 40

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

4 / 40

4.

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

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

5 / 40

5. Find and write the output of the following python code:

x = “abcdef”

i = “a”

while i in x:

print(i, end = ” “)

a) a

b) a a a a a a

c) a a a a a a … infinite times

d) Code will generate error

6 / 40

6. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

7 / 40

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

8 / 40

8. Most recent major version of Python is Python 3

9 / 40

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

10 / 40

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

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

15. Python is an interpreted programming language

16 / 40

16.

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

17 / 40

17. Extension of all Python  Programme are .py

18 / 40

18.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

19 / 40

19. Variable names are case-sensitive

20 / 40

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

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

24. Comments starts with a #

25 / 40

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

26 / 40

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

a. 5

b. 3

c. 6

d. 7

27 / 40

27. What will be the output of the following Python code?

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

28 / 40

28. Find the output of the given Python program?

a = 25if a < 15:    print("Hi")if a <= 30:    print("Hello")else:    print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

29 / 40

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

30 / 40

30. Comments can be used to make the code more readable.

31 / 40

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

32 / 40

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

33 / 40

33. Comparison operators are not  used to compare two values

34 / 40

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

35 / 40

35. Pip is  not a powerful package management system for Python software packages

36 / 40

36.

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.

37 / 40

37.

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

a. 2

b. 3

c. 5

d. Multiple times

38 / 40

38.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

39 / 40

39. Python relies on indentation?

40 / 40

40. You can have if statements inside if statements, this is called nested if statements.

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.