[miniorange_social_sharing]
[TheChamp-Login]

/40

Final Exam for Python for Everyone (A to Z)

BEST OF LUCK!!!

1 / 40

1. The format() method takes the passed arguments

2 / 40

2. python file can also run on command line

3 / 40

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

4 / 40

4.

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

5 / 40

5. Is there any comments in  following codes

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

 

6 / 40

6. You can use the append() method to add an element to an array

7 / 40

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

8 / 40

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

9 / 40

9. Python is a  high-level programming language.

10 / 40

10. Variable names are case-sensitive

11 / 40

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

12 / 40

12. Variables that are created outside of a function

13 / 40

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

14 / 40

14. To insert characters that are illegal in a string, use an escape character

15 / 40

15. Python is an interpreted programming language

16 / 40

16.

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

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

17 / 40

17. Comments can be used to explain Python code.

18 / 40

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

19 / 40

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

20 / 40

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

21 / 40

21.

In a program, a function can be called ____________ times.

a. 2

b. 3

c. 5

d. Multiple times

22 / 40

22. Who developed Python Programming Language?

23 / 40

23.

def cal(n1) : What is n1?

a. Parameter

b. Argument

c. Keyword

d. None of the above

24 / 40

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

25 / 40

25.

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

26 / 40

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

27 / 40

27.

What will be the output of above Python code?

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

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

28 / 40

28. + operator is used  to get output of multiple variables

29 / 40

29. What is the output of the given below program?

if 1 + 3 == 7:    print("Hello")else:    print("Know Program")

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

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.

Following is an example of ___________________

sv = “csiplearninghub.com”

a. List

b. String

c. Dictionary

d. None of the above

32 / 40

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

33 / 40

33.

 What is output of: 35 == 35.0

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

34 / 40

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

x = ['ab', 'cd']for i in x:    i.upper()print(x)

a) [‘ab’, ‘cd’]
b) [‘AB’, ‘CD’]
c) [None, None]
d) none of the mentioned

35 / 40

35. A loop block in python starts with a –

a) ; (semicolon)

b) , (comma)

c) : (colon)

d) # (hash)

36 / 40

36. Python has syntax that allows developers to write programs with fewer lines than some other programming languages.

37 / 40

37.

 Select the correct example of complex datatype in Python

  1. 3 + 2j
  2. -100j
  3. 5j
  4. All of the above are correct

38 / 40

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

39 / 40

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

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.