Python - PseudoCode for functions and operands -


i quite new pseudocode concept... idea of how functions , operands modulus, floor division , likes written in pseudocode. writing pseudocode code might me understand better...

user_response=input("input number: ") our_input=float(user_response)  def string (our_input):      if (our_input % 15) == 0 :         return ("fizzbuzz")     elif (our_input % 3) == 0 :         return ("fizz")     elif (our_input % 5) == 0 :         return ("buzz")     else :         return ("null")  print(string(our_input)) 

your code isn't hard understand assuming knowledge of % modulus operation. floor division can written regular division. floor result, if necessary.

if don't know how express them, explicitly write modulus(x, y) or floor(z).

pseudocode meant readable, not complicated.

pseudocode words, , not "code". pseudo part of comes logical expression of operations


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -