
Mastering Programming Concepts with Professor Ira Fay
Explore the world of programming concepts with Professor Ira Fay in Class 3 demo projects. Learn about growth mindset, coding practices, variables, methods, and more. Be prepared to code every day and understand the differences between math and programming. Enhance your skills and embrace the learning process with engaging visuals and insights.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Professor Ira Fay Class 3
Programming Concepts Unity Demo Project 1
Stand up Learn the name of someone you don t know Sit down
With a growth mindset, we can improve our skills through practicing. Learning happens over time, not instantly. The process of learning is uncomfortable when we re not competent yet.
Math and programming look similar, but aren t the same
Lines of code are executed in order = is an assignment operator Programming is typo-intolerant You have to say the magic words exactly right for the spell to work!
Variables hold information Variables can change value while the program is executing Example int myRoll;
Methods are like a factory: They take input, and spit out results Example Random.Range(1,7);
+= // if ()
totalScore = 0; myRoll = Random.Range(1, 7); totalScore = totalScore + myRoll;
totalScore = 0; myRoll = Random.Range(1, 7); totalScore += myRoll;
// Player starts with a score of 0 totalScore = 0; // Roll 1d6 myRoll = Random.Range(1, 7); // Add the roll to the score totalScore += myRoll;
totalScore = 0; // Random.Range excludes the max number when // given ints, so this returns a number 1-6 myRoll = Random.Range(1, 7); totalScore += myRoll;
totalScore = 0; // Random.Range excludes the max # for ints myRoll = Random.Range(1, 7); if (myRoll > 4) { totalScore += myRoll; }
> means greater than < means less than >= means greater than or equal to <= means less than or equal to == means equal != means not equal && means AND || means OR Remember that = is an assignment operator!
Variables hold information Variables can change value while the program is executing
How could I display the numbers 1 to 9? print ( 1 ); print ( 2 ); print ( 3 ); print ( 4 ); print ( 5 ); print ( 6 ); print ( 7 ); print ( 8 ); print ( 9 );
How could I display the numbers 1 to 99? 1 to 999?
// Count from 1 to 9 for (int i = 1; i < 10; i += 1) { print (i); } // We could also use a while() loop int i = 1; while (i < 10) { print (i); i += 1; }
// Count from 1 to 99 for (int i = 1; i < 100; i += 1) { print (i); } // We could also use a while() loop int i = 1; while (i < 100) { print (i); i += 1; }
// Count from 1 to 999 for (int i = 1; i < 1000; i += 1) { print (i); } // We could also use a while() loop int i = 1; while (i < 1000) { print (i); i += 1; }