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
Post a Comment