[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

a. 5

b. 3

c. 6

d. 7

2 / 40

2. Most recent major version of Python is Python 3

3 / 40

3.

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

4 / 40

4.

What will be the output of below Python code?

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

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

5 / 40

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

6 / 40

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

7 / 40

7.

What will be the output of above Python code?

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

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

8 / 40

8. Which term describes a loop that continues repeating without a terminating (ending) condition?

a) Infinite Loop

b) Conditional Loop

c) Unlimited Loop

d) Sequence Loop

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. Pip is  not a powerful package management system for Python software packages

11 / 40

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

12 / 40

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

13 / 40

13.

 What is output of: 35 == 35.0

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

14 / 40

14. Variable names are case-sensitive

15 / 40

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

16 / 40

16.

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

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

17 / 40

17.

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

18 / 40

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

19 / 40

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

20 / 40

20.

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

a. 2

b. 3

c. 5

d. Multiple times

21 / 40

21. Who developed Python Programming Language?

22 / 40

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

23 / 40

23.

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

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

31.

What is the data type of print(type(0xFF))

32 / 40

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

33 / 40

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

34 / 40

34.

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

a. Define

b. DEF

c. def

d. Def

35 / 40

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

36 / 40

36.

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

37 / 40

37.

What is the value of the expression 100 / 25?

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

38 / 40

38. Python has various versions available

39 / 40

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

40 / 40

40. Python is an interpreted programming language

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.