CSCI 26 Week 1 Day 1 Lecture

preview_player
Показать описание
Welcome to Discrete Math!

This class is a mix of math, and writing programs to implement those math concepts. Today we went over the syllabus and what to expect during the semester.

We then got everyone logged in on the class server, ran through a quick overview of CSCI40 & CSCI41, and then introduced our first concept in Discrete Math - the modulus operator.

When doing modulus, we will often say something like Z10, which means our "universe" of numbers are all numbers modulus 10, which is to say [0..9]. Adding, subtracting and multiplying numbers in Z10 works like normal arithmetic, except once you're done, you modulus the result by 10.

So for example, 7*9 in Z10 is 3. Why? 7*9 = 63. 63 % 10 is 3.
Рекомендации по теме