Download presentation

Presentation is loading. Please wait.

1
**What is Computer Science?**

What it is not Game Play or Game Development Animated Film Making Web Site Development Definition Computer science is the study and application of ways to represent problems in such a manner to make those problems amenable to being solved partially or completely with computer programs (i.e., software). Algorithms + Data Structures = Computer Programming. Donald Knuth

2
**What is Computer Science?**

What do computer scientists do? Development Programming or web development in a multitude of industries: business, retail, communications, entertainment, government, or defense. Operations and Maintenance Installing, configuring, monitoring or repairing computer equipment Customer service Networks and Security Installing, configuring, monitoring or repairing computer networks Network security: network protection, intrusion detection. Management Supervision of developers, operations, or networks Teaching and/or Research

3
CS Fundamentals Computer science is the study and application of ways to represent problems in such a manner to make those problems amenable to being solved partially or completely with computer programs (i.e., software). “Represent Problems”: The “stuff” on which you make decisions needs to be encoded in a manner which the computer can understand. Information Representation Data Structures Data Design “Computer Programs”: The instructions which the computer follows to accomplish the task at hand. Software Programs Algorithms So then, fundamentally, we need to know how to encode data (information representation) and write instructions (algorithms).

4
**CS Fundamentals Information Representation**

What basic kinds of information does the world contain? Numbers Characters (i.e. Letters or Symbols) Logicals Instructions or Commands Colors or Sounds References (think house address or citation) How can we organize it? Arrays: a collection of the same thing Records (or Structures): a collection of different things How does the computer store the data? All information on the computer is stored as a number So a number is a number, but characters, instructions, etc. are also numbers – so how does the computer tell the different kinds of info apart?

5
**CS Fundamentals Information Representation**

Data Typing: The kind (or type) of information is determined by the programmer telling the computer (via the program) what kind of information the number represents. (data typing example) Encoding 101 Logical: ‘1’ means yes and ‘0’ means no Instruction or Command Color or Sound (paint, paint-by-number example, digital sound) Character or Symbol (ASCII Table) Number (intro to binary, programming example) Reference (think house address or citation) Information Representation Challenges Fundamental types above tend to be too simple and static So we need flexibility in specifying types Modern languages permit new type definitions for various problems

6
**CS Fundamentals Algorithms**

Algorithm Definition: A specific, well defined procedure which has an end for accomplishing some task Three Algorithmic Constructs Sequence Decision (or Selection) Looping Examples Rock, paper, scissors Exercises Pass the Potatoes, Please Computation Exercise Algorithmic Challenges Fundamental programming operations tend to be “mathy” Need flexibility for specifying new non-mathy operations Programming languages commonly provide capabilities for new operations

7
**An Example of Data Typing**

In the example below which computes the average of a set of test scores we have four pieces of information: The number of test scores The actual test scores The sum (or total) of all the scores The average of the scores (i.e., the total divided by the number of scores The word “int” or “double” (in bold) in front of the variable name indicates how the number is to be interpreted when the program executes. int num = 3; double scores[num] = {94, 96, 99}; double total = 0.0; double average = 0.0; total = scores[0] + scores[1] + scores[2]; average = total / num; Go Back

8
**Algorithm Example Rock, Paper, Scissors**

Each player thinks of either a rock, paper or scissors One player says, “Rock, paper, scissors, shoot!!” Each player shows object he/she was thinking of (an R, P, or S) If P1 is R & P2 is S OR P1 is P & P2 is R OR P1 is S & P2 is P Player 1 wins and gloats Otherwise Player 2 wins and gloats P1 Wins? N Think Speak Show Choice P2 Gloats P1 Gloats go back

9
**Algorithm Example (cont.) Rock, Paper, Scissors**

Each player thinks of either a rock, paper or scissors One player says, “Rock, paper, scissors, shoot!!” Each player shows the object he/she was thinking of (i.e., R, P, or S) If (P1 is R & P2 is S) OR (P1 is P & P2 is R) OR (P1 is S & P2 is P) Player 1 wins and gloats If (P2 is R & P1 is S) OR (P2 is P & P1 is R) OR (P2 is S & P1 is P) Player 2 wins and gloats Otherwise Play game again P1 Wins? N P2 Wins? Y Think Speak Show Choice P2 Gloats P1 Gloats Y go back

10
**Algorithm Exercise Pass the Potato**

Develop an algorithm to solve the objective below, given certain restrictions: Objective: Be the first team to move the potato from the first person in your row to the last. Restrictions: All team players must remain in their seats, and the seats in their area, at all times. If you are handling the potato for the first time, then you may Hand the potato to the person on your left or right Toss the potato to a person in your row to the left, but not past more than one person If you are handling the potato the 2nd, 3rd, 4th, .... time, then you may Toss the potato to any person in your row GO!! go back

11
**Algorithm Exercise Computation**

Exercise the following algorithm: Get numbers A and B from the instructor If B equals 0, then go to step 7 Set C equal to the remainder of A / B Set A equal to B Set B equal to C Repeat at step 2 Stand up and, when asked, announce the final value of A go back

Similar presentations

OK

What does a computer program look like: a general overview.

What does a computer program look like: a general overview.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on trial and error movie Ppt on fibre reinforced concrete Ppt on beer lambert law examples Ppt on nursing management of spinal cord injury Ppt on internet services for class 10th Ppt on solar energy class 10 Ppt on global warming and greenhouse effect Ppt on depreciation of indian rupee 2013 Ppt on floods in india free download Ppt on synthesis and degradation of purines and pyrimidines bonding