SarkariResultess QA Bank

Python में if statement का सही syntax क्या है? — error आने पर developer क्या करे?

Other 0 Views Verified
Python में if statement का सही syntax क्या है? — error आने पर developer क्या करे?
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 then print('Adult')

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

if age >= 18 print('Adult')

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

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

if age >= 18: print('Adult')
Additional Explanation
Python blocks colon और indentation से define होते हैं। पहले traceback की exact line और input value check करें।