Nate Brunelle Today: Values and Types

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

Standard I/O Lesson Outline
Input from STDIN STDIN, standard input, comes from the keyboard. STDIN can also be used with file re-direction from the command line. For instance, if.
Starting out with C++1 Chapter 9 – Pointers Getting the address of a Variable Why do we have pointers? Indirection – difference between –Will you go out.
CS 1 with Robots Variables, Data Types & Math Institute for Personal Robots in Education (IPRE)‏
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
Georgia Institute of Technology Declaring Variables – Mod 4 Barb Ericson Georgia Institute of Technology August 2005.
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
Georgia Institute of Technology Declaring Variables – Mod 4 Barb Ericson Georgia Institute of Technology August 2005.
CONDITIONALS. Boolean values Boolean value is either true or false It is name after the British mathemetician, George Boole who first formulated Boolean.
Using variable Variables are used to store values.
Starter – Its the small things in life What’s wrong with this code Height = 10 Width = 10 A = Height * Width Print A Remember to check: Spelling Spacing.
Variables.. Part 2 Calculations. Review of yesterday Three types of variables var num:int var average:real var username:string No decimals Might have.
CS 1428 Exam I Review. Exam Format 130 Total Points – 40 Points Writing Programs – 30 Points Tracing Algorithms and determining results – 20 Points Short.
Input, Output and Variables GCSE Computer Science – Python.
Lesson 03: Variables and Types
You should have C:\100 folder A shortcut to Python IDLE on desktop.
CSC1401 Input and Output (and we’ll do a bit more on class creation)
Intro to CS Nov 2, 2015.
Introduction to Python Data Types and Variables
Declaring Variables – Mod 4
Design & Technology Grade 7 Python
Fundamentals of Programming I Managing the Namespace
CS150 Introduction to Computer Science 1
ASSIGNMENT NO.-2.
The UK Tier 1 Entrepreneur Visa and the UK Representative of Overseas Business Visa - SmartMove2UK
Do Now Heading: The Force of Gravity
HI !.
Learning Goal: Students will write a complete sentence.
Basic notes on pointers in C
What are variables? Using input()
إستراتيجيات ونماذج التقويم
Declaring Variables – Mod 4
CS1110 cs1110.cs.Virginia.edu Nate Brunelle.
Nate Brunelle Today: Functions again, Scope
To Start Create C:\100 folder
Nate Brunelle Today: Regular Expressions
C-to-LC3 Compiler Over the course of the next two weeks, you will build a program that will compile C code to LC-3 assembly language Don't panic! You.
Lesson 03: Variables and Types
Declaring Variables – Mod 4
Nate Brunelle Today: Turtles
What are variables? Using input()
Nate Brunelle Today: Values and Types
Nate Brunelle Today: Conditional Decision Statements
CS150 Introduction to Computer Science 1
Nate Brunelle Today: Lists
Nate Brunelle Today: Lists
Nate Brunelle Today: Dictionaries
DUE FRIDAY, AUG. 19 About Me Drawings Center: Your first name
Nate Brunelle Today: Functions
CS1110 Today: collections.
Nate Brunelle Today: Strings, Type Casting
Nate Brunelle Today: Conditional Decision Statements
CS150 Introduction to Computer Science 1
Is this respect. What does this tell me about you
Evaluating Expressions
What are variables? Using input()
Nate Brunelle Today: Dictionaries
Nate Brunelle Today: Conditional Decision Statements
Nate Brunelle Today: Games
Nate Brunelle Today: Functions
Nate Brunelle Today: Style, Collections
Nate Brunelle Today: Strings, Type Casting
Nate Brunelle Today: Functions again, Scope
Reading from and Writing to Files Part 2
Evaluating Expressions
CS 1111 Introduction to Programming Spring 2019
Every Night Read for Enjoyment10-20 minutes!
CS Problem Solving and Object Oriented Programming Spring 2019
Defining Functions.
Presentation transcript:

Nate Brunelle Today: Values and Types CS1110 Nate Brunelle Today: Values and Types

Questions?

Last Time Turtles drawing pictures

Silly Words Silly Bubble Jiggle Blub Plumbus

Values A “thing” 5, ½, Every value has a type

Values and Types Value Type Operators 5, 10, 0, 319, -30 int 3+7, 3-7, 3*7, 3/7 0.5, 3.1415926 55555.234 10.0 float 0.5+0.75, 0.2-1.7, 11.5*12.3, 3.2/9.8 ‘hi’ str ‘hi’+’bye’ bubble variables = print input function (): do the thing

Name/Variable/Identifier [Letter or _] [Letters or _’s or numbers] Things not allowed: Periods, hyphens, spaces, …. name = [some value] Assignment operator Gives meaning to the value Other contexts: Refers to the name we defined it to me 3 + name Use the value we assigned in the place of ‘name’

Functions Print Input