The GitHub repository containing all the material related to the Computational Thinking and Programming course of the Digital Humanities and Digital Knowledge degree at the University of Bologna (a.a. 2020/2021).
Write the flowchart of an algorithm that takes in input two objects and returns the string "yes" whether the two objects are the same; otherwise, it returns the string "no".
Thanks for your answers. A few comments about some issues I found reading your proposed solutions:
remember that defining an algorithm and executing it (i.e. passing specific input values to a computer that will follow the instruction depicted in the algorithm to return something) are two different activities. When you develop an algorithm, you do not consider, usually, particular input values (e.g. the string "john" or the number 3) but just variables / parameters (i.e. the input string a and the number n).
According to the convetion I've introduced, using "a" does not defined a variable but a string containing the character a.
The steps of the algorithms must not contain references to variables that are not initialised before or that are not the input parameter of the algorithm.
Write the flowchart of an algorithm that takes in input two objects and returns the string
"yes"
whether the two objects are the same; otherwise, it returns the string"no"
.