[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

 Select the correct example of complex datatype in Python

  1. 3 + 2j
  2. -100j
  3. 5j
  4. All of the above are correct

3 / 40

3. The len() method to return the length of an array

4 / 40

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

5 / 40

5. Extension of all Python  Programme are .py

6 / 40

6.

What is the value of the expression 100 / 25?

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

7 / 40

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

8 / 40

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

9 / 40

9.

What will be the output of below Python code?

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

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

10 / 40

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

11 / 40

11.

Write the output of the following code :

str = "Welcome"str[2] = 'a'print(str)

a. Weacome

b. Error

c. aWelcome

d. Welcomea

12 / 40

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

13 / 40

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

14 / 40

14.

Choose the correct option with respect to Python.

A. Both tuples and lists are immutable.
B. Tuples are immutable while lists are mutable.
C. Both tuples and lists are mutable.
D. Tuples are mutable while lists are immutable.

15 / 40

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

16 / 40

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

17 / 40

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

18 / 40

18. X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use?

a) while Choice == Answer:

Choice = input()

b) while Choice != Answer:

Choice = input()

c) while Answer != Choice:

Choice = input()

d) while Answer =! Choice:

Choice = input()

 

19 / 40

19. Python relies on indentation?

20 / 40

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

21 / 40

21.

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

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

22 / 40

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

23 / 40

23.

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

24 / 40

24. A variable name cannot start with a number

25 / 40

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

26 / 40

26. Variable names are case-sensitive

27 / 40

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

28 / 40

28.

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

29 / 40

29. python has two primitive loop commands:

  • while loops
  • for loops

30 / 40

30.

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

31 / 40

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

32 / 40

32.

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

33 / 40

33.

 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.

34 / 40

34.

What do we use to define a block of code in Python language?

  1. Key
  2. Brackets
  3. Indentation
  4. None of these

35 / 40

35.

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

a. True

b. False

36 / 40

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

37 / 40

37.

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.

38 / 40

38. Most recent major version of Python is Python 3

39 / 40

39. An array is a special variable, which can hold more than one value at a time

40 / 40

40. Python can be install on both  Linux and  Windows

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.