Bilinear Interpolation to Resize an Image

Bilinear Interpolation to Resize an Image

Bilinear interpolation can be used to resize an image, in particular to make it larger.  See my video at https://youtu.be/mxTUZW4CR_w for the the details. Here is the test image that I process in that video: Here is the code:

Common C Programming Mistakes

Common C Programming Mistakes

I taught C programming for many years and saw that some mistakes were fairly common, especially among people new to programming. All of these are mistakes according to the C89 standard (referred to as C89 below), but many are still wrong according to any C standard. Note that these specific error messages were generated when compiling with the GCC compiler, so the error messages you will see with a different compiler may vary from these. You can find a video…

Read More Read More

Python Application: Determining Which Degree Courses a Student is Eligible to Enroll In

Python Application: Determining Which Degree Courses a Student is Eligible to Enroll In

People learning to program often struggle with how to decompose a problem into the steps necessary to write a program to solve that problem. This is one of a series of posts in which I take a problem and go through my decision-making process that leads to a program. Problem: Compare the courses that a student has completed to the courses required for a degree and determine what courses the student is eligible to enroll in. The output of the…

Read More Read More

A Python Crash Course

A Python Crash Course

This is a short introduction to python that assumes you are already familiar with another programming language, in particular something that uses a C-like syntax. If you find this is too brief or just want more details, then you might be interested in my post Python Programming: A Self-Learning Guide. Python is a high-level, object-oriented, interpreted language. We can process python code by either typing commands directly into the interpreter or by using the interpreter to process a file of…

Read More Read More

C Application: Choosing an Electrical Plan

C Application: Choosing an Electrical Plan

People learning to program often struggle with how to decompose a problem into the steps necessary to write a program to solve that problem. This is one of a series of posts in which I take a problem and go through my decision-making process that leads to a program. Background: In the spring of 2020, it was time to choose a new electrical plan and with my current provider I basically had two options. My home has a smart meter,…

Read More Read More

C Programming: A Self-Learning Guide

C Programming: A Self-Learning Guide

The purpose of this page is to guide someone wishing to learn to program using the C programming language, specifically the ANSI Standard of 1989. Each section consists of a link to a video that teaches an element of the language sample problems for you to try. My solutions to the problems can be found at the bottom of the page. It’s OK if your solution isn’t the same as mine. Some sections also include a link to a video…

Read More Read More

Python Application: Download and Plot Stock Prices with Moving Average

Python Application: Download and Plot Stock Prices with Moving Average

People learning to program often struggle with how to decompose a problem into the steps necessary to write a program to solve that problem. This is one of a series of posts in which I take a problem and go through my decision-making process that leads to a program. Problem: Download stock prices from a website, extract the closing prices for each day, and then plot the stock prices as well as a moving average of the prices. I assume…

Read More Read More

Python Application: Print a Class Schedule

Python Application: Print a Class Schedule

People learning to program often struggle with how to decompose a problem into the steps necessary to write a program to solve that problem. This is one of a series of posts in which I take a problem and go through my decision-making process that leads to a program. Problem: Given a file of days and times for classes that a student is enrolled in, print the schedule such that it looks like a calendar. I assume that you understand…

Read More Read More

Python Programming: A Self-Learning Guide

Python Programming: A Self-Learning Guide

Note: If you already know how to program in another language, feel that the guide below is too slow for you, or just want to see more code examples then you may want to check out my Python Crash Course. The purpose of this page is to guide someone wishing to learn to program using the Python programming language. Each section consists of a link to a video that teaches an element of the language sample problems for you to…

Read More Read More

Python Application: Converting Numbers to Words

Python Application: Converting Numbers to Words

People learning to program often struggle with how to decompose a problem into the steps necessary to write a program to solve that problem. This is one of a series of posts in which I take a problem and go through my decision-making process that leads to a program. Problem: Given an integer in the range of 1 to 999, print out the number using word (e.g., 123 = one hundred twenty-three). I assume that you understand statements, conditionals, loops,…

Read More Read More