- [Voiceover] Okay, how did you make out with the challenge?…Were you able to create the datatypes necessary…to be able to create an entree and a lunch order?…I'm going to show you my version of the solution…but remember everybody programs a little differently.…I'm gonna start by creating my data types.…So I'll do datatype for bread.…And the types of bread might include,…I don't know, Rye, Wheat,…plain old white bread,…MultiGrain,…and my favorite, Sourdough.…

Next, I need a list of the types of meats…that might be in the sandwich.…And that might be Ham.…Maybe even some Pepperoni.…Maybe some Salami,…Bologna.…And let's go ahead and add some Turkey.…Okay, now we need the Cheese.…And the types as we offer is American,…Provolone,…Cheddar,…PepperJack,…and Swiss.…

And finally, we need a list of the condiments…that the user can choose from.…Maybe they want Pickles.…They might want Lettuce.…They might want Tomato.…Maybe a Relish,…Onions…and Mustard,…Mayo.…Oops, looks like I have an error somewhere.…So datatype, oh I put datatypes instead of datatype.…

Resume Transcript Auto-Scroll

Author

Released

3/9/2016

What is discrete math, and how does it apply to programming? Math is an important part of all programming. Discrete mathematics is the study of mathematical structures that are unique (aka discrete). Think integers, graphs, and logical statements—things we use a lot in programming. Discrete math can be used for software design specifications, analysis of algorithms, and other practical applications, but it's really a great tool to develop as a programmer. Put simply, it's a building block for logical thinking.

This course relies on an open-source SML (standard machine language) library to demo the concepts behind discrete math. Peggy Fisher shows you how to manipulate sets of data, write proofs and truth tables, analyze data sequences, and visualize data using graph theory. Challenges at the end of every chapter allow you to test your knowledge. By the end of the course, you should be able to make the leap from theory to using discrete math in practice: saving time and resulting in code that's cleaner and easier to maintain in the long run.