Katherine Kampf / kkampf

Slides:



Advertisements
Similar presentations
CS 1400 Chapter 2 sections 1, 2, 4 – 6, 8,
Advertisements

Your First C++ Program Aug 27, /27/08 CS 150 Introduction to Computer Science I C++  Based on the C programming language  One of today’s most.
© 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5/e Starting Out with C++: Early Objects 5 th Edition Chapter 2 Introduction.
1 9/20/06CS150 Introduction to Computer Science 1 Review: Exam 1.
CS31: Introduction to Computer Science I Discussion 1A 4/2/2010 Sungwon Yang
Overview of C++ Chapter 2 in both books programs from books keycode for lab: get Program 1 from web test files.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
C++ Programming Language Day 1. What this course covers Day 1 – Structure of C++ program – Basic data types – Standard input, output streams – Selection.
Section 2 - More Basics. The char Data Type Data type of a single character Example char letter; letter = 'C';
VARIABLES, TYPES, INPUT/OUTPUT, ASSIGNMENT OPERATION Shieu-Hong Lin MATH/CS Department Chapel.
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to C++ Programming Outline Introduction to C++ Programming A Simple Program: Printing a.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 4: Continuing with C++ I/O Basics.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan Snd Term Nouf Aljaffan (C) CSC 1201 Course at KSU1.
CSC 107 – Programming For Science. Announcements  Memorization is not important, but…  … you will all still be responsible for information  Instead.
C++ Programming: Basic Elements of C++.
Fundamental Programming: Fundamental Programming Introduction to C++
CSC 107 – Programming For Science. The Week’s Goal.
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan (C) CSC 1201 Course at KSU1.
A first program 1. #include 2. using namespace std; 3. int main() { 4. cout
CSC 107 – Programming For Science. Announcements.
C++ Basics. Compilation What does compilation do? g++ hello.cpp g++ -o hello.cpp hello.
CS Class 03 Topics  Sequence statements Input Output Assignment  Expressions Read pages Read pages 40 – 49 for next time.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 9, 2005 Lecture Number: 6.
1 8/31/05CS150 Introduction to Computer Science 1 Hello World!
C++ / G4MICE Course Session 1 - Introduction Edit text files in a UNIX environment. Use the g++ compiler to compile a single C++ file. Understand the C++
CS Jan 2007 Chapter 2 sections 1, 2, 4 – 6, 8,
Think First, Code Second Understand the problem Work out step by step procedure for solving the problem (algorithm) top down design and stepwise refinement.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
Welcome to Mario Kart!... Er… EECS 183 Discussion!
Bill Tucker Austin Community College COSC 1315
Discussion #1: “Hello, World!” September 6th, 2016 Kevin Lee (mrkevin)
Elementary Programming Concepts Hannah Westra
C++ First Steps.
Introduction to C++ (Extensions to C)
Chapter Topics The Basics of a C++ Program Data Types
ECE Application Programming
Jie(Jay) Wang Week1 Sept. 30
ANNOUNCEMENT The missed lecture will be made up this Monday evening in the Tech PC classroom (MG51). A tentative time interval is 6:30-8:00. The exact.
Chapter 2: Introduction to C++
Computing and Statistical Data Analysis Lecture 2
Chapter 2 - Introduction to C Programming
Computing Fundamentals
Basic Elements of C++.
Beginning C++ Programming
Introduction to C++ October 2, 2017.
Chapter 2 - Introduction to C Programming
Elementary Programming Concepts Andrew (amwallis)
Chapter 2: Introduction to C++
Basic Elements of C++ Chapter 2.
CS 1430: Programming in C++ Turn in your Quiz1-2 No time to cover HiC.
C++ fundamentals Lecture 1, Chapter 2 – pp /22/2018 Y K Choi.
2.1 Parts of a C++ Program.
Introduction to C++ Programming
Introduction to Primitive Data types
Variables T.Najah Al_Subaie Kingdom of Saudi Arabia
Wednesday 09/23/13.
Chapter 2: Introduction to C++.
Programs written in C and C++ can run on many different computers
Engineering Problem Solving with C++ An Object Based Approach
Engineering Problem Solving with C++ An Object Based Approach
Life is Full of Alternatives
Arithmetic Operations
Capitolo 1 – Introduction C++ Programming
(Dreaded) Quiz 2 Next Monday.
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2019
Introduction to C Programming
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2019
Introduction to Primitive Data types
Presentation transcript:

Katherine Kampf / kkampf EECS 183 – DISCuSSION 1 Katherine Kampf / kkampf

Take a few minutes to get to know each other!

About Me Senior in CS-LSA Usually attend the 8:30am lecture Office Hours are Tuesday 3-6pm Worked at Microsoft as a PM this summer Favorite areas of CS: security and UX design Ask me about: XCode, Mac OS X, interviews/internships/resumes, women in STEM, HKN, working for a big tech company, Parks and Recreation

Discussion Format Review of lecture material Sample code/problems Tips for projects and exams Questions and feedback welcome anytime Let me know if you need any special accommodations or if there is anything I can do to improve your course experience!

Office Hours North Campus in the Duderstadt center third floor east side M, W, Th, F 3-8pm and Tues 3-6pm Sometimes additional hours posted on the website Paper signup sheet Schedule posted online OH start and end when they say they do!

Upcoming Dates Assignment Due Zynate readings Before each lecture This Friday 9/16 6pm Project 1 Friday 9/23 6pm

IDEs and Program Basics We support Xcode and Visual Studio Detailed installations and project startup instructions on the website Don’t forget to check out the style guide eecs183.org/vs eecs183.org/xcode

IDEs and Program Basics IDEs provide a code editor where you write and edit code This code is sent to a compiler The compiler turns your code into object code

What is an algorithm? Specific series of steps used to solve a problem Counting people in a room Making pasta Finding a page in a book Algorithms vary in efficiency and speed You’ll learn more about this in EECS 203 and 280

Which of these are reserved words? Reminder: reserved words are key words reserved by C++ that have specific meanings and can’t be used as variable names

cout and cin cout prints to standard output You always need to add #include <iostream> at the top of your file when using these! This allows access to the iostream library which holds the cin and cout operations cout << cin >> cout prints to standard output cin reads input from the user

Variables An element in code that has a specific type and holds or stores values Use descriptive names with these! Can’t be reserved words type name value bool isHungry = true;

Data Types Type What is it? Examples int Whole number 6, 42 double Decimal numbers 5.3, 6.0 char Single character, denoted by single quotes ‘d’, ‘0’, ‘g’, ‘$’ string Collection of multiple characters, denoted with double quotes “Go Blue!”, “EECS 183 rox” bool Holds values true and false false (0), true (1 and any other non-zero number)

Sample Program #include <iostream> #include <string> using namespace std; int main (){ cout << “Enter your name: “ << endl; string users_name; cin >> users_name; cout << “Hello “ << users_name << “!”; cout << endl; return 0; } Output: Enter your name: Katherine Hello Katherine!

Operations and Operators + - / % * = -order of operations applies

Operations with different types Types matter in operations! Dividing an integer by an integer results in an integer 3 / 2 = 1 The result is truncated down Dividing an integer by a double or vice versa results in a double 3 / 2.0 = 1.5 6.8 / 2 = 3.4

Modulus Operator % This operator gives you the remainder of a division 5 % 2 = 1

Modulus Operator % This operator gives you the remainder of a division 5 % 2 = 1 Think about how many times the second number goes into the first 2 % 5?

Modulus Operator % This operator gives you the remainder of a division 5 % 2 = 1 Think about how many times the second number goes into the first 2 % 5? 2! Since 2 does not go into 5 at all, you’re left with the original number

Tips for Success Post on Piazza Start early (the CS mantra) Plan before you code Work with friends Use whiteboards Don’t stress! You’ll do great

Questions? Assignment Due Zynate readings Before each lecture This Friday 9/16 6pm Project 1 Friday 9/23 6pm kkampf@umich.edu