Informatics Practices
Evaluate the following expression:
(i) 12/3+4**2-6/3
(ii) not True or False and True
Python Funda
1 Like
Answer
(i) 12 / 3 + 4**2 - 6 / 3
= 12 / 3 + 16 - 6 / 3
= 4 + 16 - 2
= 20 - 2
= 18
(ii) not True or False and True
= False or False and True
= False or False
= False
Answered By
3 Likes
Related Questions
Consider the following dictionary
Book = {1 : "Informatics Practices", 2 : "Computer Science ", 3 : "Information Technology"}Jaya executes statement:
2 in BookAssertion (A): For the above dictionary Book, the output of the statement
2 in Bookis True.Reasoning (R): For Dictionary, the ‘in’ and ‘not in’ operators return True or False.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
For a given list
L = [1, 2, 3, 4, 5, 6]
the index of element 4 will be:
Assertion (A): The index of element 4 will be 3 or -3.
Reasoning (R): Python list supports forward and backward indexing with -1 to given to left most and 0 to right most element.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
What will be the output of the following code?
for k in range(-10, 0, 2): print(k)Differentiate between Cloud Computing and Grid Computing with suitable examples.