Sunday, January 21, 2018

[Bioinformatics 101] 004. if else statement



Hello! This is Kenneth J Han!

In this post, we are going to look at if ... else statement.




004. IF ELSE Statement

Problem
Check whether the variable num1 is multiple of 3 or multiple of 7.
Pseudocode
num1 ← 7

IF num1 % 3 == 0
    PRINT "Multiple of 3"
ELSE IF num % 7 == 0
    PRINT "Multiple of 7"
ELSE
    PRINT "None of them"

Answer
Multiple of 7

If you have difficulties solving problem, visit the links below!
Your source code is on ready to serve!

Python source code answer on Github
Java source code answer on Github








See you on next post!

1 comment:

  1. WMS — A big European developer who aims at producing the best sport software, like their classic – Bier Haus. A progressive jackpot is a slot or another casino sport with a jackpot that will get bigger and larger each time you or any other player for that matter performs it. The jackpot prize accumulates as long as|so long as} nobody lands the proper combination to set off the super-high jackpot. Ignition Casino is a incredible place for all types type|for all sorts} of casino games — particularly for progressive jackpots. If that isn’t sufficient to pique your curiosity, 천하카지노 this on-line casino all the time has a New Game and a 24/7 bonus if you become a regular. Besides, you've have} a dozen more welcome bonuses select from|to select from} when you don’t just like the one we recommend — simply create an account and open the promotions tab for a full breakdown.

    ReplyDelete