Programming and Algorithms: Week 11
What are we doing this week?
This week we are going to look at a STRUCTURED PROGRAMMING, focusing on the ideas of PARAMETER PASSING and VARIABLE SCOPE.
Moving onto the Python side of things we will look at
STRUCTURED PROGRAMMING and
MENU-DRIVEN PROGRAMS
.
PseudoCode
Python
Powerpoint:
Structured Programming
Powerpoint:
Structured Programming
Powerpoint:
Menu-Driven Programs
Menu-Driven Programs
Total running time of videos is 30 minutes.
Links
Python Course: Global, Local and Non-local Variables
https://www.python-course.eu/python3_global_vs_local_variables.php
Geeks for Geeks: Global and Local Variables in Python
http://www.geeksforgeeks.org/global-local-variables-python/
Python Course: Parameter Passing
https://www.python-course.eu/passing_arguments.php
Python Fiddle: Simple Text Menu
http://pythonfiddle.com/simple-text-menu-for-python/
Python 3 Programming Tutorial - Function Parameters
Python Tutorial: Variable Scope:
Understanding the LEGB rule and global/nonlocal statements
Sample Code:
Modularised Prime Checker
*
Parameterised Prime Checker
* Global and Local Variables with Strings (
Example 1
,
Example 2
,
Example 3
,
Example 4
) * Global and Local Variables with Integers (
Example 1
,
Example 2
,
Example 3
) *
JK Flip Flop
*
Simple Calculator
Lab #11
Lab #11 is all about checking if what you have learned in the episodes above all makes sense, and use MENU-DRIVEN PROGRAMS.
If you have any suggestions, corrections, or comments, please feel free to e-mail me at:
Damian.Gordon(a)dit.ie