Writing self-describing code

Report a typo

Look at the code below. You can see comments that start with "#".

# calculation of hypotenuse according to the Pythagorean theorem 

a = 5 # first side of a triangle 

b = 10 # second side of a triangle 

c = sqrt(a^2 + b^2) # hypotenuse

Choose the possible replacements for the names of variables to make this piece of code self-documenting. Replacements are marked with "->" symbols.

Select one or more options from the list
___

Create a free account to access the full topic