Computer Science Core Concepts

Slides:



Advertisements
Similar presentations
INTEC CS160 - Jeanine Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 3 Control Structures and Data Files.
Advertisements

Chapter 4: Control Structures I (Selection)
CHAPTER 5: Repetition Control Structure. Objectives  To develop algorithms that use DOWHILE and REPEAT.. UNTIL structures  Introduce a pseudocode for.
 Control structures  Algorithm & flowchart  If statements  While statements.
CS001 Introduction to Programming Day 3 Sujana Jyothi
Chapter 4 Control Structures I. Objectives ► Examine relational and logical operators ► Explore how to form and evaluate logical (Boolean) expressions.
July 13 th.  If/ Else if / Else  Variable Scope  Nested if/else's  Switch statements  Conditional Operator.
Chapter 2: Algorithm Discovery and Design
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 4: Control Structures I (Selection)
Program Design and Development
1 Lecture 7:Control Structures I (Selection) Introduction to Computer Science Spring 2006.
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
1 Python Chapter 4 Branching statements and loops © Samuel Marateck 2010.
Programming Fundamentals. Today’s lecture Decisions If else …… Switch Conditional Operators Logical Operators.
Jaeki Song ISQS6337 JAVA Lecture 04 Control Structure - Selection, and Repetition -
PHP Logic. Review: Variables Variables: a symbol or name that stands for a value – Data types ( Similar to C++ or Java): Int, Float, Boolean, String,
CPS120: Introduction to Computer Science Decision Making in Programs.
ㅎㅎ logical operator if if else switch while do while for Third step for Learning C++ Programming Repetition Control Structures.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 ‏ Control Structures.
Chapter 3 - Structured Program Development Outline 3.1Introduction 3.2Algorithms 3.3Pseudocode 3.4Control Structures 3.5The If Selection Structure 3.6The.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Control Statements I.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
4.1 Object Operations operators Dot (. ) and new operate on objects The assignment operator ( = ) Arithmetic operators + - * / % Unary operators.
Programming 1 DCT 1033 Control Structures I (Selection) if selection statement If..else double selection statement Switch multiple selection statement.
A loop is a repetition control structure. body - statements to be repeated control statement - decides whether another repetition needs to be made leading.
`. Lecture Overview Structure Programming Basic Control of Structure Programming Selection Logical Operations Iteration Flowchart.
Algorithms: Branching and Iteration (in Scratch)
Chapter 15 JavaScript: Part III The Web Warrior Guide to Web Design Technologies.
Quiz 3 is due Friday September 18 th Lab 6 is going to be lab practical hursSept_10/exampleLabFinal/
ITEC 109 Lecture 11 While loops. while loops Review Choices –1 st –2 nd to ?th –Last What happens if you only use ifs? Can you have just an else by itself?
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
8. DECISION STRUCTURES Rocky K. C. Chang October 18, 2015 (Adapted from John Zelle’s slides)
CSI 3125, Preliminaries, page 1 Control Statements.
Why Repetition? Read 8 real numbers and compute their average REAL X1, X2, X3, X4, X5, X6, X7, X8 REAL SUM, AVG READ *, X1, X2, X3, X4, X5, X6, X7, X8.
IST 210: PHP LOGIC IST 210: Organization of Data IST210 1.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Pseudocode. Algorithm A procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.
Introduction to Programming G50PRO University of Nottingham Unit 6 : Control Flow Statements 2 Paul Tennent
Conditional Statements A conditional statement lets us choose which statement will be executed next Conditional statements give us the power to make basic.
IST 210: PHP Logic IST 210: Organization of Data IST2101.
if ( condition ) statement; if is a Java reserved word The condition must be a boolean expression. It must evaluate to either true or false.
Program design Program Design Process has 2 phases:
REPETITION CONTROL STRUCTURE
Sequence, Selection, Iteration The IF Statement
The switch Statement, and Introduction to Looping
Welcome to Computer Science Jeopardy
PROGRAM CONTROL STRUCTURE
JavaScript: Control Statements I
Ch 7: JavaScript Control Statements I.
Programming Fundamentals
Expressions and Control Flow in JavaScript
JavaScript: Control Statements.
Looping and Repetition
CMSC 120: Visualizing Information 3/25/08
MSIS 655 Advanced Business Applications Programming
3 Control Statements:.
` Structured Programming & Flowchart
Chapter 4: Control Structures I (Selection)
ICT Programming Lesson 3:
Understanding Conditions
The structure of programming
Introduction to Programming
The structure of programming
Loops CGS3416 Spring 2019 Lecture 7.
Thinking procedurally
CPS120: Introduction to Computer Science
REPETITION Why Repetition?
COMPUTING.
Presentation transcript:

Computer Science Core Concepts

What is Computer Science? Computer Science is the creation and adaptation of technology

What is programming?

Instructions for a computer to follow to perform a task Programming Instructions for a computer to follow to perform a task

What is an algorithm?

Algorithms A process to follow to solve a problem; a set of instructions

What is A variable?

Variable A symbol or name that represents a value Can declare, assign or change the value of variables

What is Boolean?

Boolean A data type that returns only true or false. It will not return numbers*, words, etc.. True=1 False=0 *the only numbers Boolean will return

What is A Comparator?

Comparators (aka Logic operators) Compare two or more Variables The result of the comparison is a boolean value Equal to == and Not equal to != or Greater than > not Greater than or equal to >= Less than < Less than or equal to <=

Comparators (con’t) x = 10 y = 20 What is the boolean value of the following expressions? x == y x != y x > y x >= y x < y x <= y

What is An if-else statement?

If-Else Statements When a comparison is True, then the if- block will be executed. And, if a comparison is False, then the else- block will be executed.

If-Else Statements examples y = 4 What is the boolean value of the following expressions? if (x > y and y != 5) if (x < y or x >= 5) print (“Hello!”) print (“Hola!”) else else print (“Bye!”) print (“Adios!”) if ((x-y)==4) print (“Bonjour!”) else print (“Au revoir!”)

What is Branching?

Branching A branch is a set of instructions that, when executed, cause the computer to begin execution of a different instruction sequence. Branching can use if-else or switch statements

What is a loop?

LOOPS Series of instructions that is repeated until a given condition is false

LOOPS (Types) for loop: executed at least once, and the number of repetitions is known while loop: repeatedly executed statement; will be executed 0-infinity times

What is iteration?

Iteration Iteration is the act of repeating a process Each time a loop runs, that is one iteration.

What is a function?

Functions A small set of instructions that defines how to complete a specific task The “Add ten to a number” is the function

You learned about ... Computer Science Programming Algorithm Variable Boolean Comparators If/Else Loops For Loop While Loop Iteration Function

Review!