Informatics Practices
Construct a logical expression to represent each of the following conditions:
(a) Marks are greater than or equal to 70 but less than 100.
(b) Num is between 0 and 5 but not equal to 2.
(c) Answer is either 'N' OR 'n'.
(d) Age is greater than or equal to 18 and gender is male.
(e) City is either 'Kolkata' or 'Mumbai'.
Related Questions
Assertion (A): Indentation is a very important factor while writing a program in Python.
Reasoning (R): Indentation refers to the spaces at the beginning of a code line. Multiple statements with the same indent are classified as a block of code.
- 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 are compound statements?
Find error in the following code (if any) and correct it by rewriting the code and underline the corrections:
code=input ("Enter season code : ") if code=w: print "winter season" elif code==r: PRINT "rainy season" else: Print "summer season"Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 += num2 + num3 print(num1)