ET 154 Computer Programming

I. CATALOG DESCRIPTION:

ET154 Computer Programming C 1, P 2, CR 2

This is a foundation course in computer programming for Electrical Engineering Technology. No previous programming knowledge is assumed. The course uses a high level programming language and examines the available structures on a typical personal computer platform. Programming techniques and algorithm development are presented with real world examples from the electrical field. The use of schematic capture and electrical circuit simulation software is included.

Corequisites: ET151 Circuits 1 or ET101 Technical Electricity

II. MATERIALS:

Text: Python for Everybody, by Charles Severance. This is a nice, free OER (Open Educational Resource) text. You can download this as a PDF, read it on-line as HTML or buy a print copy

Lab Manual: Laboratory Manual for Computer Programming with Python, Multisim and TINA /4E, by James Fiore. A free OER:  PDF   ODT   HTML   PRINT 

Video: See the Python and Circuit Simulators playlists on my YouTube channel: ElectronicsWithProfessorFiore 

 III. STUDENT LEARNING OUTCOMES:

The student will demonstrate an understanding of programming a digital computer using a high level language.

The student will demonstrate problem analysis and solution techniques using the computer as a tool. These techniques will be applied and expanded upon in subsequent courses in the EET curriculum.

The student will demonstrate a basic knowledge of how to use a modern IDE (integrated development environment).

The student will demonstrate knowledge of the fundamentals of schematic capture.

The student will demonstrate knowledge of the fundamentals of computer circuit simulation.

Through the laboratory, the student will demonstrate practical insight and knowledge of computer systems.



Course Assessment Standards

Background

This course assumes no familiarity with computers. Much of our work will revolve around using the Python language to help solve electrical problems. We will also introduce the use of circuit simulation tools such as TINA (Toolkit for Interactive Network Analysis). A scientific calculator will prove useful. Please note that smart devices will not be allowed during tests. For lab, you'll probably want a USB thumb drive to store your work (space is also available on the student network H drive). Lab exercises are due at the start of the next lab session. A printout of both properly commented program code and results is expected. Hand written code will not be accepted. Late penalty is one letter grade for the first half week late, two letter grades for the second half week. Assignments are not accepted beyond that and receive a grade of 0. Remember, plagiarism is grounds for failure. Although I encourage students to help each other, these assignments are individual works. Anyone caught copying someone else's programs, or allowing someone to copy their programs will receive a grade of 0. (Obtaining proof is much easier than one might think.)

Note: The most recent version of the Python programming language and tools are available at www.python.org. Python runs on many different platforms including Windows, Mac OS X, and Linux and is available for free. Download the latest release of version 3. A free copy of the TINA simulator, called TINA-TI, is available at https://www.ti.com/tool/TINA-TI. You might also consder TINACloud.

Session-by-session progress and assignments (note: for the half-semester version of this course there are two sessions per week which means two lectures and two labs each week for 7 weeks).

1

Our first session is an introduction to computers: what they are, the various types, and a representative block diagram. Examples include desktop machines, engineering workstations, and embedded applications. We introduce the ideas of bits and bytes, and look at typical applications such as word processors.

  • Reading: Check out the web site www.python.org and the TINA sites referenced above.
  • Problems: Install TINA on your home computer from the TI.com site. 
  • Video: Python Intro from the Python Playlist.
  • Lab: We start with proper lab safety procedures, network and operating system essentials, student space, etc. We then look at obtaining and installing TINA and Python.
2

This session we discuss the idea of circuit simulation and analysis, including schematic capture and virtual instruments.

  • Problems: Create versions of lab circuits (such as those used in Circuits 1 and Intro to Electronics) using TINA.
  • Video: Intro to TINA-TI from the Simulators Playlist.
  • Lab: Introduction to TINA How to create circuit schematics, set component values, and obtain basic operational results.
3

We extend our discussion of circuit analysis and introduce the concept of PCB layout.

  • Problems: Make sure that you have downloaded the Python development tools and installed them on your home computer (currently version 3.7).
  • Video: TINA-TI Transient Analysis from the Simulators Playlist.
  • Lab: TINA Extensions Advanced features including analysis.
4

This session we introduce Python programming and note the differences in the various generations of programming languages.We introduce the concepts of variables, statements, and I/O (input/output). In order to appreciate some of the humor found in the on-line Python doc files, if you're not already familiar with Monty Python, be sure to watch the movie Monty Python and the Holy Grail and also Life of Brian and The Meaning of Life, if time allows. 

  • Reading: Chapter one and begin chapter two. 
  • Problems: Exercises 1, 2, 3, 5, 6 and 7 at the end of chapter one.
  • Video: Basics from the Python Playlist.
  • Lab: Introduction to Python This is an intro to the Python programming environment and initial programming with print statements, basic math and comments.
5

We continue our introductory material and look at variable types and basic operations (strings and numerics). Also, we examine how to obtain data from the user.

  • Reading: Finish chapter two.
  • Problems: Exercises 2, 3, 4 and 5 at the end of chapter two.
  • Video: User Input from the Python Playlist.
  • Lab: Obtaining User Data We create a simple Ohm's Law calculator.
6

Extensions of strings and numeric operations are the subjects of this week, including conversion between the various types. We also introduce conditionals: the if statement.

  • Reading: Read chapter three.
  • Problems: Exercise 1 in chapter three. Do the Intro Homework sheet (treat this as a self-test).
  • Video: Conditionals Part 1 from the Python Playlist.
  • Lab: Conditionals-if We create a program that determines battery life depending on case size and current drain.
7

This session we finish conditionals: the if-else and variants, and logical operators. We also introduce functions and random numbers.

  • Reading: Read chapter four.
  • Problems: Exercise 3 in chapter three.
  • Video: Conditionals Part 2 from the Python Playlist.
  • Lab: More Conditionals A resistor tolerance program that computes whether or not a measured component falls within specified tolerances.
8

Around here we'll have our first in-class Python programming test.

  • Reading: Review for test.
  • Problems: Review for test.
  • Video: Random Numbers from the Python Playlist.
  • Lab: Random Numbers We look at random number generation and its use in simulation.
9

This session we begin discussing looping constructs, namely the while loop.

  • Reading: Start chapter five.
  • Problems: Exercises 4, 5, 6 and 7  in chapter four.
  • Video: Looping Part 1 from the Python Playlist.
  • Lab: Iteration We look at a technique to verify the maximum power transfer theorem.
10

We look at loops-within-loops, and introduce the for loop.

  • Reading: Complete chapter five. Also read the looping notes.
  • Problems: Exercises 1 and 2  in chapter five.
  • Video: Looping Part 2 from the Python Playlist.
  • Lab: Caerbannog The ever-popular Python rabbit game. No graphics, but fun just the same. A unique example of using a while loop and random numbers for simulation, and also a good exercise to stretch your imagination and glue together a few of the recent concepts.
11

This session we continue with variations on loops and other useful items.

  • Reading: Read chapter six and start chapter eight. 
  • Problems: Exercise 5 in chapter six.
  • Video: User Functions from the Python Playlist.
  • Lab: Continue with Caerbannog.
12

We continue to examine the use of strings and introduce tuples and lists (similar to the arrays found in other languages).

  • Reading: Finish chapter eight and read chapter ten.
  • Problems: Exercise 6 in chapter eight. Try the Loops and Sequences worksheet (treat this as a self-test).
  • Video: Sequences Part 1 from the Python Playlist.
  • Lab: Tuples An interesting little utility sometimes called curses. You can have a bit of fun with this one. This might remind you of the scenes in Monty Python and the Holy Grail when Arthur meets up with the French knights guarding the castle. If you finish early, begin work on the next assignment, Functions and Files.
13

This is our last session of Python instruction and includes the use of files.

  • Reading: Read chapter seven.
  • Problems: Exercises 1 and 3 in chapter seven.
  • Video: Sequences Part 2 from the Python Playlist.
  • Lab: Functions and Files We create a quality control program that computes tolerance percentages for a manufacturing run.You will need the this data file: res3300.data or alternately, this version res3300.txt
14

Our last in-class test will be here. If time permits, we will continue looking at files in chapter seven. Please note that there are many useful and fun topics left in the text that you may find satisfying to study on your own.

  • Reading: Review for test.
  • Problems: Review for test.
  • Video: Files from the Python Playlist.
  • Lab: We complete the Functions and Files program and test it during lab.


[Home] [MVCC Home]

2021 Jim Fiore