[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. Can we write if/else into one line in python?

a) Yes
b) No
c) if/else not used in python
d) None of the above

2 / 40

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

3 / 40

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

4 / 40

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

5 / 40

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

6 / 40

6. Python can be install on both  Linux and  Windows

7 / 40

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

8 / 40

8. You can have if statements inside if statements, this is called nested if statements.

9 / 40

9. Comments starts with a #

10 / 40

10. Python has various versions available

11 / 40

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

12 / 40

12. Variables that are created outside of a function

13 / 40

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

14 / 40

14.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

15 / 40

15. X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use?

a) while Choice == Answer:

Choice = input()

b) while Choice != Answer:

Choice = input()

c) while Answer != Choice:

Choice = input()

d) while Answer =! Choice:

Choice = input()

 

16 / 40

16.

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

17 / 40

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

18 / 40

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

19 / 40

19. break in Python is used ______________

a) To restart a loop

b) Terminate a loop

c) To jump in between the loop

d) None of the above

20 / 40

20. Extension of all Python  Programme are .py

21 / 40

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

22 / 40

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

23 / 40

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

24 / 40

24. Python is an interpreted programming language

25 / 40

25. if statements cannot be empty, but if you for some reason have an if statement with no content, put in the pass statement to avoid getting an error

26 / 40

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

27 / 40

27. Most recent major version of Python is Python 3

28 / 40

28. Python can connect to database systems.

29 / 40

29.

What will be the output of above Python code?

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

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

30 / 40

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

31 / 40

31.

 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.

32 / 40

32.

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

33 / 40

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

34 / 40

34.

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.

35 / 40

35. python file can also run on command line

36 / 40

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

37 / 40

37.  ________ in Python is a counter-controlled loop.

a) for

b) while

c) Both (a) and (b)

d) None of the above

38 / 40

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

39 / 40

39.

What is the value of the expression 100 / 25?

  1. 4
  2. 4.0
  3. 0
  4. 25

40 / 40

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

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.