Python Practice Set 7

1. In computer science, algorithm refers to a particular method used by a computer to solve a problem.


2. Any algorithm is a program.


3. Python is case sensitive when dealing with identifiers


4. Can mathematical operations be performed on strings?


5. The precedence level of addition and subtraction is the same.


6. The expression int(x) means that the variable x is converted to an integer.


7. values() is a function of dictionary that gets all the values ​​from dictionary?


8. nested if-else is allowed in Python.


9. The unichr(x) function in Python converts an octal string to an integer.


10. In python, the frozenset(s)function converts a sequence of tuple into a dictionary.


11. If t=(1,2,4,3) then which of the following option is wrong?


12. Which is the correct operator for pow(x,y) ?


13. What is the return type of function id()?


14. Which of the following cannot be used as an identifier?


15. Which of the following is not a core data type?


16. What is the return type of inf?


17. Which of the following is a valid string constant in python?


18. What will be the output of the following ‘python’ program? a=1 b=5 if(a==5 or b>10): print("I will certainly pass") else: print("I am not so sure about the result")


19. The result of a relational operation is always


20. If we want to store the values ​​in terms of key and value then which data type do we use.


21. What do we use to define a block of code in Python language?


22. Which of the following is wrong in Python programming language?


23. Can the value of a Tuple be changed?


24. The items in the list are written inside curly braces { }?


25. Duplicate items are entered in the set.