Back
CS-I ISP Journal Blog
J1002: Shell J1006: Source Control J1008: Merlin Mission Manager J1012: Alternative Base Addition J1013: Boolean Algebra J1016: Logic Composition J1017: Binary Adders J1151: Conditional and Flow Chart J1152: While Loops J1292: Useful Randomness

CS-I Journal J1151: Conditional and Flow Charts

Author: Tiffany Jiang

Date: 19-Jan-2023

I received assistance from: NO ONE

I assisted: NO ONE

 

Section 1

1.1: How does branching enable significantly more complex program behavior?

Ans: Branching allows for options to be give, increasing the amount of ways that a program can be run.

1.2: Why do you think the term consequent is used to refer to the statements that are executed whenthe boolean test evaluates to true?

'Consequent' would refer to the direct and foremost result of a question, as opposed to 'alternative,' which suggests that the answer is another option.


Section 2

2.1: Why is the first Jump instruction conditional? What determines whether the jump will be executed or not?

The program tests whether the number is lesser than equal (indicated by "jle" in line 13) to four (indicated by "$4" on line 9), and the jump to the "alternative" option occurs if this is true.

2.2: What is the purpsose of the Jump conditional after the consequent?

It makes the program jump to the process under "afterAlternative".

Why is there no need for a corresponding Jump instruction after the alternative?

The "afterAlternative," or the process that ends the program, is consecutive after the 'alternative' sequence.


Exercise

(xml file linked in heading)

 

What did I learn? What is the "big idea"?

Flow charts can help organize and display a proccess, and are consist of shapes that depict various operations connected by arrows. The process by which flow charts operate by are very similar to how programs are written in assembly language.

What challenges did I encounter?

Thinking through the logic carefully was a little confusing, but using the drawing application allowed me to visualize it better.

How could this experience be improved?

I wonder if the rhombus Decision symbol can have three or more options attached to it.