[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 statements assigns the value 25 to the variable x in Python:

  1. x ← 25
  2. x = 25
  3. x := 25
  4. int x = 25
  5. x << 25

2 / 40

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

3 / 40

3. Python can connect to database systems.

4 / 40

4. Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*

5 / 40

5. Indentation refers to the spaces at the beginning of a code line.

6 / 40

6. Is Python code compiled or interpreted?
a) Python code is both compiled and interpreted
b) Python code is neither compiled nor interpreted
c) Python code is only compiled
d) Python code is only interpreted

7 / 40

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

8 / 40

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

9 / 40

9.

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

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

10 / 40

10.

Which of the following precedence order is correct in Python?

  1. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
  2. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential
  3. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential
  4. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

14. Comments can be used to explain Python code.

15 / 40

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

16 / 40

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

17 / 40

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

18 / 40

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

19 / 40

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

20 / 40

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

21 / 40

21. The for loop does not require an indexing variable to set beforehand

22 / 40

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

23 / 40

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

24 / 40

24.

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

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

28. Comparison operators are not  used to compare two values

29 / 40

29.

 What is output of: 35 == 35.0

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

30 / 40

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

31 / 40

31. Variables that are created outside of a function

32 / 40

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

33 / 40

33. Most recent major version of Python is Python 3

34 / 40

34.

What will be the output of below Python code?

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

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

35 / 40

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

36 / 40

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

37 / 40

37. Is there any comments in  following codes

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

 

38 / 40

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

39 / 40

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

40 / 40

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

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.