[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

Which of the following statement will execute in last?

def s(n1): #Statement 1      print(n1) #Statement 2n2=4 #Statement 3s(n2) #Statement 4

a. Statement 1

b. Statement 2

c. Statement 3

d. Statement 4

2 / 40

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

3 / 40

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

4 / 40

4. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

5 / 40

5. What is the output of the given below program?

if 3 + 4 == 7:    print("Hi")else:    print("Know Program")print("Hello")

a) Hi
b) Know Program

c)
Hi
Hello

d)
Know Program
Hello

6 / 40

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

7 / 40

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

8 / 40

8. print() function is often used to output variables.

9 / 40

9.

 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.

10 / 40

10.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

11 / 40

11.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

12 / 40

12. Is there any comments in  following codes

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

 

13 / 40

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

14 / 40

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

15 / 40

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

16 / 40

16.

Which of the following creates a tuple?

A. tuple1=(“a”,”b”)
B. tuple1[2]=(“a”,”b”)
C. tuple1=(5)*2
D. None of the above

17 / 40

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

18 / 40

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

19 / 40

19. Python is an interpreted programming language

20 / 40

20.

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

21 / 40

21. Variable names are case-sensitive

22 / 40

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

23 / 40

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

24 / 40

24. The format() method takes the passed arguments

25 / 40

25. Extension of all Python  Programme are .py

26 / 40

26.

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

a. 2

b. 3

c. 5

d. Multiple times

27 / 40

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

28 / 40

28. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).

29 / 40

29. The for loop in Python is an _____________

a) Entry Controlled Loop

b) Exit Controlled Loop

c) Both of the above

d) None of the above

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.

What will be the output of below Python code?

str1="Information"print(str1[2:8])

A. format
B. formatio
C. orma
D. ormat

32 / 40

32. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

33 / 40

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

34 / 40

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

35 / 40

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

36 / 40

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

37 / 40

37.

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

38 / 40

38. python has two primitive loop commands:

  • while loops
  • for loops

39 / 40

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

40 / 40

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

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.