Prof. Todd Neller Gettysburg College

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Karel – Making More Complex Decisions IF / THEN / ELSE IF THEN BEGIN Instructions END ELSE BEGIN Instructions END Do these when test = False Do these when.
CS101: Introduction to Computer programming
Franklin Township Elementary School Career Day: Computer Science
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
Selection (decision) control structure Learning objective
Session Objectives# 24 COULD code the solution for an algorithm
Creating Computer Programs lesson 27. This lesson includes the following sections: What is a Computer Program? How Programs Solve Problems Two Approaches:
Top-Down Design CSC 161: The Art of Programming Prof. Henry Kautz 9/16/2009.
Intro to Programming Algebra-Geometry. Computer Programming? What is programming? The process of writing, testing, and maintaining the source code of.
CS001 Introduction to Programming Day 3 Sujana Jyothi
Intro to Java while loops pseudocode. 1 A “Loop” A simple but powerful mechanism for “making lots of things happen!” Performs a statement (or block) over.
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
index.php Palmyra Area High School 1.
Chapter 9 IF Statement Bernard Chen. If Statement The main statement used for selecting from alternative actions based on test results It’s the primary.
Activity 1 Revise / remember what the term ‘binary logic’ means. What do each of the following look like: NOT gate? AND gate? OR gate? 5 minutes.
Algorithmic Problem Solving CMSC 201 Adapted from slides by Marie desJardins (Spring 2015 Prof Chang version)
Control Structures FOR Statement Looping.
An Overview of Programming in Python CSC 161: The Art of Programming Prof. Henry Kautz 9/9/2009 Slides stolen shamelessly from Dr. Mark Goadrich, Centenary.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Flowcharts.
CPS120 Introduction to Computer Programming The Programming Process.
ALGORITHM CHAPTER 8. Chapter Outlines and Objectives  Define an algorithm and relate it to problem solving.  Define three construct and describe their.
PROGRAMMING In Lesson 2. STARTER ACTIVITY Complete the starter activity in your python folder – lesson 2 Now we will see how you got on and update your.
Module 3: Steering&Arrays #1 2000/01Scientific Computing in OOCourse code 3C59 Module 3: Algorithm steering elements If, elseif, else Switch and enumerated.
Chapter 3: Branching and Program Flow CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Algorithms Writing instructions in the order they should execute.
CHAPTER 3 Decisions and Repetition. A few new constants Constants so far:  Strings  Numbers  integer  float Boolean constants: [On board]
Conditional Loops CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Algorithms and Pseudocode
Cracking the Code WHAT WORKS WHEN TEACHING STUDENTS TO CODE?
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Control Structures WHILE Statement Looping. S E Q C E N U E REPITITION …a step or sequence of steps that are repeated until some condition is satisfied.
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.
Phase 3: Game Creation. Phase 3: Game Creation Outcomes (Slide 1) I can create a flowchart to solve a problem, for example to make a cup of tea. I can.
Loops causes program to execute the certain block of code repeatedly until some conditions are satisfied. Suppose you want to execute some code/s 10 times.
Understand Problem Solving Tools to Design Programming Solutions
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
Welcome to Computer Science Jeopardy
Creativity in Algorithms
Transition to Code Upsorn Praphamontripong CS 1110
Understand Problem Solving Tools to Design Programming Solutions
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
Expressions and Control Flow in JavaScript
Creativity in Algorithms
CPS120: Introduction to Computer Science
Prof. Todd Neller Gettysburg College
Welcome to <INSERT school name>’s
Stage 8: Maze: Conditionals
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Hour of Code.
Programs as Directions
Computer Science Core Concepts
ICT Programming Lesson 3:
Franklin Township Elementary School Career Day: Computer Science
Creating Computer Programs
PYTHON: BUILDING BLOCKS Sequencing & Selection
Data and Flowcharts Session
ICT Gaming Lesson 2.
Nested If Statements While Loops
Your Name: Blockly Games: MAZE.
Welcome to Mountain View Elementary School!
Data and Flowcharts Session
Introduction to Computer Science
Building Complex Behaviors: Actions and States
Creating Computer Programs
U3L4 Using Simple Commands
Lesson 3. Controlling program flow. Loops. Methods. Arrays.
Presentation transcript:

Prof. Todd Neller Gettysburg College Hour of Code 2014 Prof. Todd Neller Gettysburg College

Hour of Code What is “coding” or “programming”? Who can code? Instructing a computer to solve a problem. Computer Scientists call programs “algorithms”. Who can code? You can. You learn algorithms from a young age (example: multidigit addition). You can also express algorithms with practice.

Why Code? Why should I code? It’s EMPOWERING. “Knowledge is power.” Coders work the world’s knowledge. It’s PROFITABLE. There’s a huge need for good computer problem solvers. Large demand + small supply = $$$ It’s FUN. Being a good problem solver is creative and satisfying.

Blockly Commands Move forward Turn left/right Statements Repeat until __ Repeat __ times Loops If path __ do __ else __ If path __ do __ Decisions Play

Coding is Like Legos Unlike spoken languages, computer languages have few words and simple grammar rules. With very few types of code “pieces”, we can construct code of amazing complexity. Learning how to code isn’t so much about the pieces, as learning interesting patterns for combining them.

Python Number Guessing Game import random secret = random.randint(1, 100) print('I am thinking of a number from 1 to 100.') gameOver = False while not gameOver: guess = int(input('Your guess? ')) if guess == secret: print('Correct!') gameOver = True else: print('Lower.' if guess > secret else 'Higher.')

To Remember Coding has simple pieces (statements, loops, & decisions) that can be assembled in complex ways to solve difficult problems. You’ve learned algorithms. You can learn how to express them and have the computer do it! The computer is a power tool for the mind. Knowing how to code is like having a super power.

Next Steps http://tinyurl.com/gburghoc this presentation, more Blockly mazes, free coding resources, and more. Enjoy learning more about coding!