[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1.

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

2 / 40

2. Most recent major version of Python is Python 3

3 / 40

3. A variable name cannot start with a number

4 / 40

4.

How to copy one list to another in python?

A. l1[] = l2[]
B. l1[] = l2
C. l1[] = l2[:]
D. l1 = l2

5 / 40

5.

Which of the following statement is a function call?

a. call sum( )

b. def sum( )

c. sum( )

d. function sum( )

6 / 40

6.

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

7 / 40

7.

In the Python statement x = a + 5 – b:

a and b are ________a + 5 - b is ________
  1. terms, a group
  2. operators, a statement
  3. operands, an expression
  4. operands, an equation

8 / 40

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

9 / 40

9. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

10 / 40

10. Python relies on indentation?

11 / 40

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

12 / 40

12. Python is a  high-level programming language.

13 / 40

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

14 / 40

14. Find the output of the given Python program?

a, b, c = 1, 3, 5if a > 0:  if b < 2:    print("Hi")  elif c > 3:    print("Hello")else:  print("Know Program")

a) Hi
b) Hello
c) Know Program
d) Compiled Successfully, No Output.

15 / 40

15. Python has various versions available

16 / 40

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

17 / 40

17. Who developed Python Programming Language?

18 / 40

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

19 / 40

19.

 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.

20 / 40

20.

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.

21 / 40

21. python file can also run on command line

22 / 40

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

23 / 40

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

24 / 40

24.

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

a. Define

b. DEF

c. def

d. Def

25 / 40

25.

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

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. You can return a range of characters by using the slice syntax

28 / 40

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

29 / 40

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

30 / 40

30.

What will be the output of above Python code?

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

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

31 / 40

31. Comparison operators are not  used to compare two values

32 / 40

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

33 / 40

33.

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

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

34 / 40

34.

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

35 / 40

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

36 / 40

36.

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

a. True

b. False

37 / 40

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

38 / 40

38. Variable names are case-sensitive

39 / 40

39. An example of an illegal character is a double quote inside a string that is surrounded by double quotes

40 / 40

40.

Which is the correct operator for power(xy)?

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

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.