create account

If statements and comparisons by filler

View this thread on steemit.com
· @filler ·
$0.07
If statements and comparisons
If statement is used for comparing. Please look at the screenshot to see how it's done. 

The if statement compares the numbers and if it is true, it returns the output and false if it is not true. 

The true or false value is got by giving the comparison. 

![Capture.JPG](https://cdn.steemitimages.com/DQmeuSu894vs39sCzDRSxe5gmLkmxDjfN1qWvW71nA2uKud/Capture.JPG)

The usual comparison operators are:
(= =) - equal to 

(>) - greater than 

(<) lesser than 

(>=) greater than or equal to

(<=) lesser than or equal to 


[!=] not equal 

I put them in brackets because markdown is messing with it. 

We can also compare strings. Comparison is not limited to numbers alone. 

These comparison operators are extremely useful. 

Image source - screenshot of colab
👍  , , , , , , , , , , , , , , , ,
properties (23)
post_id81,639,109
authorfiller
permlinkif-statements-and-comparisons
categorycoding
json_metadata{"tags":["coding","python","neoxian","palnet","basics"],"image":["https:\/\/cdn.steemitimages.com\/DQmeuSu894vs39sCzDRSxe5gmLkmxDjfN1qWvW71nA2uKud\/Capture.JPG"],"app":"neoxiancity\/0.1","format":"markdown","canonical_url":"https:\/\/www.neoxian.city\/@filler\/if-statements-and-comparisons"}
created2019-11-11 08:46:30
last_update2019-11-11 08:46:30
depth0
children1
net_rshares389,334,659,359
last_payout2019-11-18 08:46:30
cashout_time1969-12-31 23:59:59
total_payout_value0.033 SBD
curator_payout_value0.033 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length762
author_reputation3,668,127,682,393
root_title"If statements and comparisons"
beneficiaries
0.
accountneoxianburn
weight500
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (17)
@steemitboard ·
Congratulations @filler! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@filler/payout.png?201911110917"></td><td>You received more than 100 as payout for your posts. Your next target is to reach a total payout of 250</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@filler) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=filler)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


**Do not miss the last post from @steemitboard:**
<table><tr><td><a href="https://steemit.com/steemfest/@steemitboard/steemfest-meet-the-stemians-contest-the-mysterious-rule-revealed"><img src="https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmasWw4jQHwxng82DKxY6Q6tVg9mWcto4xcDURs8knFgCa/image.png"></a></td><td><a href="https://steemit.com/steemfest/@steemitboard/steemfest-meet-the-stemians-contest-the-mysterious-rule-revealed">SteemFest Meet The Stemians Contest - The mysterious rule revealed</a></td></tr></table>

###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
post_id81,641,207
authorsteemitboard
permlinksteemitboard-notify-filler-20191111t103347000z
categorycoding
json_metadata{"image":["https:\/\/steemitboard.com\/img\/notify.png"]}
created2019-11-11 10:33:45
last_update2019-11-11 10:33:45
depth1
children0
net_rshares0
last_payout2019-11-18 10:33:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,449
author_reputation30,510,157,139,933
root_title"If statements and comparisons"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000