4 JavaScriptHangman
4 JavaScriptHangman
https://www.edrawsoft.com/flowchart-examples-for-students.php
FLOWCHART EXAMPLE #2
Should I do my homework now?
FLOWCHART SYMBOLS
Terminator. starting or ending point
of the system.
https://www.visual-paradigm.com/tutorials/flowchart-tutorial/
FLOWCHART EXAMPLE #3
What should I eat for lunch?
TRY IT – WITH A PARTNER
Pedagogy sidebar.
• You can provide a flowchart OR ask students
to do it
• Best to use flowcharts for complex processes
(just boring for routine tasks)
• There are automated tools (e.g., Dia) that
streamline the process.
HANGMAN FLOWCHART
https://www.w3schools.com/js/js_random.asp
PROMPT
https://www.w3schools.com/js/js_popup.asp
WHILE LOOP
0 10 30
1 40 60
2 70 90
• Size assumptions:
– margin (space before/between lines) is 10, line length is 20 (2*margin)
– indent (from start of line to start of letter) is 2
• y is constant again, but needs to be above line (see descenders in image)
ix X formula
0 12 margin+indent (ix+1)*margin +
indent
1 42 margin+line+margin+indent (ix+1)*margin +
ix * line length +
indent
2 62 margin+line+margin+line+indent same as above