SarkariResultess QA Bank

Python में if statement का सही syntax क्या है? — interview में इसका सही जवाब क्या है?

Other 0 Views Verified
Python में if statement का सही syntax क्या है? — interview में इसका सही जवाब क्या है?
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified

if age >= 18 print('Adult')

if age >= 18 print('Adult')
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified

if (age >= 18) { print('Adult') }

if (age >= 18) { print('Adult') }
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified

if age >= 18 then print('Adult')

if age >= 18 then print('Adult')
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified Correct Answer

if age >= 18: print('Adult')

if age >= 18: print('Adult')
Additional Explanation
Python blocks colon और indentation से define होते हैं।