[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 is False?

A. String is immutable.
B. capitalize() function in string is used to return a string by converting the whole given string into uppercase.
C. lower() function in string is used to return a string by converting the whole given string into lowercase.
D. None of these.

2 / 40

2. You can also have multiple else statements on the same line:

3 / 40

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

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. You can also use the remove() method to remove an element from the array

6 / 40

6. What is another word for ‘iteration’ ?

a) Selection

b) Assignment

c) Sequencing

d) Repetition

7 / 40

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

8 / 40

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

9 / 40

9.

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

10 / 40

10. Python is a  high-level programming language.

11 / 40

11. Python can connect to database systems.

12 / 40

12.

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

13 / 40

13.

Which is the correct operator for power(xy)?

  1. X^y
  2. X**y
  3. X^^y
  4. None of the mentioned

14 / 40

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

15 / 40

15. You can also have an else without the elif

16 / 40

16. Which of the following is False regarding loops in Python?

a)Loops are used to perform certain tasks repeatedly.

b) while loop is used when multiple statements are to executed repeatedly until the given condition becomes true.

c) while loop is used when multiple statements are to executed repeatedly until the given condition becomes false.

d) for loop can be used to iterate through the elements of lists.

17 / 40

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

18 / 40

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

19 / 40

19. python has two primitive loop commands:

  • while loops
  • for loops

20 / 40

20. During Installation Make sure to select both the checkboxes at the bottom .

21 / 40

21. python file can also run on command line

22 / 40

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

23 / 40

23. Python can be install on both  Linux and  Windows

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

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

30 / 40

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

31 / 40

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

32 / 40

32.

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

a. 2

b. 3

c. 5

d. Multiple times

33 / 40

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

34 / 40

34.

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.

35 / 40

35.

What will be the output of above Python code?

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

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

36 / 40

36. Python relies on indentation?

37 / 40

37. Python has various versions available

38 / 40

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

39 / 40

39. Comparison operators are not  used to compare two values

40 / 40

40.

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

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.