December 2016
Beginner
197 pages
4h 18m
English
© Sanjib Sinha 2017
Sanjib Sinha, Beginning Ethical Hacking with Python, 10.1007/978-1-4842-2541-7_10
Sanjib Sinha1
(1)Howrah, West Bengal, India
In Python there are two types of conditionals. They are: conditional executions and conditional values or conditional expressions . In conditional executions we execute or check the condition of the statement. We know that between two values there could be three types of conditions. It is either less than or greater than or it is equal. Write this code:
<code>def conditionals_exec():a, b = 1, 3if a < b:print("a is less than b")elif a > b:print("a is greater than b")else:print("a is equal to b")conditionals_exec()</code>
The output is:
######################### ...Read now
Unlock full access