New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Introducing Computer Science

by: Ethan Sheppard

Introducing Computer Science C S 142

Ethan Sheppard
View Full Document for 0 Karma

View Full Document


Unlock These Notes for FREE

Enter your email below and we will instantly email you these Notes for Intro to Computer Programing

(Limited time offer)

Unlock Notes

Already have a StudySoup account? Login here

Unlock FREE Class Notes

Enter your email below to receive Intro to Computer Programing notes

Everyone needs better class notes. Enter your email and we will send you notes for this class for free.

Unlock FREE notes

About this Document

These notes cover the first week, which cover basic programming concepts, errors, and a beginning code example.
Intro to Computer Programing
Samantha Sanders
Class Notes
Computer Science




Popular in Intro to Computer Programing

Popular in Computer Science and Engineering

This 2 page Class Notes was uploaded by Ethan Sheppard on Sunday September 4, 2016. The Class Notes belongs to C S 142 at Brigham Young University taught by Samantha Sanders in Fall 2016. Since its upload, it has received 71 views. For similar materials see Intro to Computer Programing in Computer Science and Engineering at Brigham Young University.

Similar to C S 142 at BYU

Popular in Computer Science and Engineering


Reviews for Introducing Computer Science


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/04/16
Introduction Monday, August 29, 2016 2:54 PM Programming-the act of designing and implementingcomputer programs. These tell a computerstep by step of how to accomplish a certain task. The CPU- The brain of the computer, executes an operation at a time, controls programs and processes data. All data comesthrough the CPU. The computer stores data in memory.Peripherals are input and output devices that are tolls for the user to control and use. Computer programs are stored as machine code. The code is numbers stored in the computer's memory.High level languages like C++ work independent of the hardware. Compiler- translates a higher level language into a machine code specific for the computersprocessor. C++ history- began before 1972, C in 1972, then eventually C++ in 1985. Presently,a general purpose language used for a variety of functions and programs. The compiler translates C++ programs into machine code, a linker combines machine code with library code into an executable. Process:begin > edit > compile > error? > test > run-time errors? > end Basic Hello World Program: 1 #include <iostream> 2 3 using namespace std; 4 5 int main() 6 { 7 Cout << "Hello, World!" << endl; 8 Return 0; 9 } 1. Header, specifying services to use (in this case input/output) 3. Directivespecifying standard services 5. Every program has a main function, meaning a value will be returned. 6/9. Every function is contained in braces. 7. Cout commandprints out what follows. Endl means end line, and will then moveon to the next line. 8. The value returned by the function, set to 0 to tell the program that it is finished. Hello, World! Is a string, so it is contained in quotation marks. Each statementends with a semicolon,similar to a period for a sentence. 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 4 5 int main() 6 { 7 Cout << "Hello, my name is Hal!" << endl; Cout << "What would you like me to do/?" << endl; String user_input; Getline(cin, user_input); Cout << "I'm sorry, I can't do that." << endl; 8 Return 0; 9 } Errors: 1. Compile-timeor syntax error, a part of the program that does not conform to the rules of the programming language. Example: leaving off a semi-colon,misspelling commands like cout. 2. Run-time or logic error, errors in a program that compiles,but doesn't perform the intended action. Example:misspelling what you want to print out, or giving a variable the wrong number. Sometimesan exception occurs, and will abort your program with an error message. Algorithms Developing software 1. Understand the problem 2. Developand describe an algorithm 3. Test the algorithm with simple inputs 4. Translate the algorithm into C++ 5. Compile and test your program Pseudocode: an informal description of the algorithm, something that you translate into code. 1. Unambiguous- there are precise instructions at each step and where to go next 2. Executable- each step can be carried out 3. Terminating- will eventually end and not infinitely repeat.


Buy Material

Are you sure you want to buy this material for

0 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.