[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

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

2 / 40

2.

 What is output of: 35 == 35.0

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

3 / 40

3.

Which is the correct operator for power(xy)?

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

4 / 40

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

5 / 40

5.

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

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

6 / 40

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

7 / 40

7. Camel Case
Each word, except the first, starts with a capital letter:

8 / 40

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

9 / 40

9. Variable names are case-sensitive

10 / 40

10. What does the following code print?

x = -10if x < 0:    print("The negative number ",  x, " is not valid here.")print("This is always printed")
a.This is always printedb.The negative number -10 is not valid hereThis is always printedc.The negative number -10 is not valid here

11 / 40

11.

Which function overloads the >> operator?

  1. more()
  2. gt()
  3. ge()
  4. None of the above

12 / 40

12. Pascal Case
Each word starts with a capital letter:

13 / 40

13. The elif keyword is pythons way of saying “if the previous conditions were not true, then try this condition”.

14 / 40

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

15 / 40

15.

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

a. True

b. False

16 / 40

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

17 / 40

17.

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

18 / 40

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

19 / 40

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

20 / 40

20.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

21 / 40

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

22 / 40

22.

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

23 / 40

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

24 / 40

24.

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

a. [ ]

b. { }

c. ( )

d. None of the above

25 / 40

25. Comments can be used to explain Python code.

26 / 40

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

27 / 40

27.

Which one of the following is the correct extension of the Python file?

  1. .py
  2. .python
  3. .p
  4. None of these

28 / 40

28. You can also use the remove() method to remove an element from the array

29 / 40

29.

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

30 / 40

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

31 / 40

31. Python can be install on both  Linux and  Windows

32 / 40

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

33 / 40

33. python file can also run on command line

34 / 40

34.

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

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

35 / 40

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

36 / 40

36. Is there any comments in  following codes

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

 

37 / 40

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

38 / 40

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

39 / 40

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

40 / 40

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

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.