What will be the output of the following códe?
x = True
y = False
z = False
if not x or y:
print (1)
elif not x or not y and z:
print (2)
elif not x or y or not x and y:
print (3)
else:
print (4)
Answers
Answer:
= True
y = False
z= False
If not x or y:
print 1
elif not x or not y and z: print 2
elif not x or y or not y and x print 3
else:
print 4
Corrected CØde:
X = True y = False
z = False
if not x or y:
print (1) elif not x or not y and z:
print (2) elif not x or y or not y and x:
print (3)
else:
print (4)
Output:
. 3
Explanation:
It's given that, 1. x = True 2. y = False
3. z = False
not x or y = not True or False
= not True True or False is true as one condition is true.]
= False [not True means False]
Therefore, the result is false. >> If block will not execute.
Now, check the second condition,
not x or not y and z
= not True or not False and False
= False or True and False
Order of evaluation is from left to right.
= (False or True) and False
= True and False
= False (As one condition is False = ]
Therefore, the result is false. >> First else if block will not execute.
Now, check the next condition,
not x or y or not y and x
= not True or False or not False and True
= False or False or True and True [not True = False and not False = True
= (False or False) or True and True
= (False or True) and True False or False is False as whole condition is False]
= True and True (True as one condition is True
= True
Therefore, result is True, >> This block will execute.
.. Output: 3
Explanation:
pls mark brainliest
Explanation:
It is given:
Charcoal has the initial activity, which is denoted as A_{0}=15.3A
0
=15.3 disintegrations per minute per gram.
Charcoal has the half-life, T 12=5730T12=5730 years
After a few years, the charcoal’s final activity, A = 12.3 disintegrations per minute per gram
Constant of disintegration,
\lambda=0.693 \mathrm{T} 12=0.6935370 \mathrm{y}-1λ=0.693T12=0.6935370y−1
For the action to attain 12.3 disintegrations per minute per gram, let the time taken by the sample at a time of t year.
Sample’s activity,
A=A O e-\lambda tA=AOe−λt
A=A O e-0.6935730 \times tA=AOe−0.6935730×t
\Rightarrow \mathrm{t}=1804.3 \text { years }⇒t=1804.3 years