[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

3 / 40

3. Variable names are case-sensitive

4 / 40

4. Most recent major version of Python is Python 3

5 / 40

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

6 / 40

6. You can use three double quotes only:

a = “””Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.”””
print(a)

7 / 40

7.

What will be the output of below Python code?

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

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

8 / 40

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

9 / 40

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

10 / 40

10.

l = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python?

  1. List
  2. Tuple
  3. Set
  4. None of these

11 / 40

11.

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.

12 / 40

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

13 / 40

13. Is there any comments in  following codes

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

 

14 / 40

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

15 / 40

15. Python is a  high-level programming language.

16 / 40

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

17 / 40

17. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

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

18 / 40

18.

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

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

19 / 40

19. Python can be used to handle big data and perform complex mathematics.

20 / 40

20.

 What is output of: 35 == 35.0

  1. False
  2. True
  3. 33
  4. None of the above

21 / 40

21. Python is an interpreted programming language

22 / 40

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

23 / 40

23. The format() method takes the passed arguments

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

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

  1. d = {"john":40, "peter":45}
  2. d["john"]

a) 40
b) 45
c) “john”
d) “peter”

28 / 40

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

29 / 40

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

30 / 40

30.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

31 / 40

31.

The function can be called in the program by writing function name followed by ____

a. [ ]

b. { }

c. ( )

d. None of the above

32 / 40

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

33 / 40

33.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

34 / 40

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

35 / 40

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

36 / 40

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

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

40.

What is the value of the expression 100 / 25?

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

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.