PREREQUISITES
To Practice this Program, you should have a basic knowledge of the following Topics:
WHAT TO DO ?
Given, lottery_number = 22.
Ask a user to guess the lottery number between 1 to 100.
HOW TO DO ?
Following are the steps to do :
</p>
<div class="wp-block-codemirror-blocks-code-block code-block">
<pre>lottery_number = 22
number = int(input("Guess a winning lottery number between 1 to 100 . "))
</pre>
</div>
<div class="wp-block-codemirror-blocks-code-block code-block">
<pre>if number>22:
print("higher")
elif number<22:
print("lower")
else:
print("You made a correct guess.")</pre>
</div>
Things We Covered
- Accepting User Data (Input Function)
- Creating IF-ELIF-ELSE (Conditionals)
- Print/Output the Data (Print Function)
Posted by Akshay Gupta
