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

2 / 40

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

3 / 40

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

4 / 40

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

5 / 40

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

6 / 40

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

7 / 40

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

8 / 40

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

9 / 40

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

10 / 40

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

11 / 40

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

12 / 40

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

13 / 40

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

14 / 40

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

15 / 40

15.

 ____________________ can be defined as a named group of instructions that accomplish a specific task when it is invoked/called.

a. Function

b. Datatype

c. Token

d. Operator

16 / 40

16. Python relies on indentation?

17 / 40

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

18 / 40

18. Comments can be used to explain Python code.

19 / 40

19. Comments starts with a #

20 / 40

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

21 / 40

21. Python can be install on both  Linux and  Windows

22 / 40

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

23 / 40

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

24 / 40

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

25 / 40

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

26 / 40

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

27 / 40

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

28 / 40

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

29 / 40

29.

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

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

30 / 40

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

31 / 40

31.

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

32 / 40

32. What will be the output of the following Python code?

  1. d = {"john":40, "peter":45}
  2. d["john"]

a) 40
b) 45
c) “john”
d) “peter”

33 / 40

33.

What will the below Python code will return?

If str1="save paper,save plants"str1.find("save")

A. It returns the first index position of the first occurance of “save” in the given string str1.
B. It returns the last index position of the last occurance of “save” in the given string str1.
C. It returns the last index position of the first occurance of “save” in the given string str1.
D. It returns the first index position of the first occurance of “save” in the given string str1.

34 / 40

34. Python is an interpreted programming language

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 can be treated in a procedural way, an object-oriented way or a functional way.

37 / 40

37. python has two primitive loop commands:

  • while loops
  • for loops

38 / 40

38.

What will be the output of below Python code?

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

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

39 / 40

39. Python is a  high-level programming language.

40 / 40

40. Which of the following is a Python tuple?
a) [1, 2, 3]
b) (1, 2, 3)
c) {1, 2, 3}
d) {}

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.