Computer Science I Go over midterm. Reprise on curves. Table examples. The map function. Testing Strings. Fonts. Classwork/Homework: Complete midterm project.

Slides:



Advertisements
Similar presentations
The essentials managers need to know about Excel
Advertisements

EXCEL UNIT 2 Computer Technology Timpview High School.
Answer "What If" Questions
Microsoft Excel Khan Mohammad Mahmud Hasan
Microsoft Excel Presented by ShoWorks Fair Software and Online Entries
 Variables  What are they?  Declaring and initializing variables  Common uses for variables  Variables you get “for free” in Processing ▪ Aka: Built-in.
Variables Conditionals Loops The concept of Iteration Two types of loops: While For When do we use them? Iteration in the context of computer graphics.
1. Chapter 29 Creating Forms 3 Understanding Forms Word enables you to create fill-in forms to eliminate the need for storing pre-printed forms. Add.
Chapter 4 Financial Functions, Data Tables, and Amortization Schedules
Pre-defined System Functions Simple IF & VLOOKUP.
Copyright 2003 Peter McDevitt 1 Microsoft Excel 2002 Lecture 3 – A Professional Looking Worksheet.
What is Excel?? An electronic spreadsheet program What does that mean? – Stores and manipulates numbers – Makes tables with text or numbers – Creates.
SUNY Morrisville-Norwich Campus- Week 7 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
ICM Week 2. Structure - statements and blocks of code Any single statement ends with semicolon ; When we want to bunch a few statements together we use.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 11 1 Microsoft Office Excel 2003 Tutorial 11 – Importing Data Into Excel.
Unit G: Using Complex Formulas, Functions, and Tables Microsoft Office Illustrated Fundamentals.
L13_1 Microsoft Excel - Building a Worksheet * Excel * Starting Excel and the Excel Window * Entering Text and Numbers * Calculating a Sum * Using the.
GTECH 201 Lecture 03 Data measurements Data errors.
Microsoft Office © Copyright William Rowan Objective By the end of this you will have being given a brief introduction to: Microsoft Word Microsoft.
Reporting Aesthetics An ACEware Webinar 1:00-2:00 pm February 14 th, 2008.
Add a File with X, Y coordinates to MapWindow
©2001 Chariot Software Group Using MicroGrade Classroom Management Software.
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
CTS130 Spreadsheet Lesson 5 Working with Simple Formulas.
Introducing... NPF Connect Press [Space Bar] to continue...
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
+ Using Excel for Data Collection March 2012 (OK. It’s less painful than it sounds…)
October 2003Bent Thomsen - FIT 3-21 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
 Introduction to MS-Excel Introduction to MS-Excel  Entering data in EXCEL Entering data in EXCEL  Formulas & Functions in EXCEL Formulas & Functions.
Microsoft Excel Spreadsheet Review. Templates  Templates can be produced for the following elements:  Text and Graphics  Formatting Information – Layouts,
Using FrontPage Express. Slide 1 Standard toolbars and menus Time indicator: gives an approximation of download time of the page.
1 Data List Spreadsheets or simple databases - a different use of Spreadsheets Bent Thomsen.
06. Excel Charts. File -> Open -> 06b-datastart.xlsx.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Excel Spreadsheet basics. Excel Sheets and Books  Spreadsheet: tool to analyze, chart and manage data for personal, business and financial use Worksheet:
SPREADSHEET BASICS SPREADSHEET BASICS What are the benefits of using a spreadsheet to solve a problem?
Enhancing Your Web Site—Adding Links Web Page **YOU MUST HAVE COMPLETED THE 1ST 3 WEB PAGES BEFORE YOU CAN DO THIS ONE. **YOU SHOULD HAVE COMPLETED THE.
Demographic Profiles of Agency Clients - Part 2 Next, we will create a table and a column chart for the conservator field in my database. Because we are.
Keyboard and Events. What about the keyboard? Keyboard inputs can be used in many ways---not just for text The boolean variable keyPressed is true if.
Spreadsheet Notes. 1. What is a spreadsheet? A bunch of rows and columns of information. Used to organize and analyze information. Also called a worksheet.
Key Words: Functional Skills. Key Words: Spreadsheets.
EXCEL UNIT 2 Computer Technology Timpview High School.
CIS 3.5 Lecture 2.2 More programming with "Processing"
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
Microsoft® Excel Key and format dates and times. 1 Use Date & Time functions. 2 Use date and time arithmetic. 3 Use the IF function. 4 Create.
Application Software Advanced Spreadsheets "Number crunching"
MICROSOFT WORD 2010 Lesson 6: Word Templates. The goal of this lesson is for the students to successfully create and work with templates. The student.
Excel 2007 Part (3) Dr. Susan Al Naqshbandi
MySQL Importing and creating a database. CSV (Comma Separated Values) file CSV = Comma Separated Values – they are simple text files containing data which.
Computer Science I Recap: variables & functions. Images. Pseudo-random processing.
Computer Science I Looping. User input. Classwork/Homework: Incorporate looping & user input into a sketch.
G RAPHICS & I NTERACTIVE P ROGRAMMING Lecture 2 More Programming with Processing.
 Columns  Rows  Cells  Ranges  Cell addresses  Column headers  Row headers  Formulas  Spreadsheet.
Computer Science I Share plans for virtual something. Text. Show my virtual dog. Classwork: Plans for your virtual something. Homework: start implementation.
Microsoft Excel ( XP-2003). Return to Table of Contents Table of Contents 1_ Introduction to ExcelIntroduction to Excel 2_ Overview of the Excel.
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
Computer Science I Text input. Transformations. Yet another jigsaw. Classwork/Homework: Create new application making use of transformations.
Computer Science I Animations. Bouncing ball. The if statement. Classwork/homework: bouncing something. Compress and upload work to Moodle.
Paper 2 Exam Tips Guidance: 1.Evidence Document 2.Unit 9: – Communication ( ) 3.Unit 10: - Document Production (Word) 4.Unit 16: PowerPoint 5.Unit.
Computer Science I More class examples. Paths. Jigsaw. Tolerance. Classwork/homework: Your class project. Post proposal for midterm project.
Time to upload Virtual something.
Computer Science I Libraries. Sound. Saving frames as images. Classwork/Homework: Make sketch using sound. Add saving frames.
Pages Appendix B: Review of ExcelChapter 3 Market Trends & Analysis IBM 320 CAL POLY POMONA IBM320 Market Trends and Analysis Maha Ghosn.
CONDITIONAL FORMATTING AND CUSTOM NUMBER FORMATS LEC 5 1.
Loops. About the Midterm Exam.. Exam on March 12 Monday (tentatively) Review on March 5.
Computer Science I Fonts. Building on one jigsaw to make another.
IPC144 Introduction to Programming Using C Week 4 – Lesson 2
How to Create Tables & Graphs in Excel
Presentation transcript:

Computer Science I Go over midterm. Reprise on curves. Table examples. The map function. Testing Strings. Fonts. Classwork/Homework: Complete midterm project.

Midterm Recap Difficulties

Bezier curves Look back at flower example. Ways to draw curves. Processing shape includes – vertex – bezierVertex (Bezier cubic) – quadVertex (Bezier quadratic) Processing procedure (others) is to start off curve with first anchor point, then specify control point or points, and next anchor point.

A9zier_curve

Table Processing has built-in facilities for handling data in tables, such as comma separated values (csv) saved from spreadsheet (Excel) files. Table is an object defined by a class, much like we (the programmers) can do. The table needs to be added to the data folder using Sketch/Add File – Reference suggests that loadTable can accept a URL. Investigate this!

Example My examples are only "stubs". You can and should add to them. – Read in csv file and display data after specific key pressed Chance to talk about strings. – Use Button class to set up buttons to display information on console. – Draw graph

Excel Create [simple] spreadsheet and Save As csv. – Will get warning that this format does not preserve all functionality of original.

In Processing Sketch/Add file … – So this will go into data folder. My sketches don't use the header row—but my code needs to say there is a header My sketches don't use the Total column.

Planning Global variables for the whole table and for 3 columns of data Define setup, draw, keyPressed methods plus my extractdata method.

Start of Sketch int[] quizScores; int[] projectScores; int numOfStudents; String[] names; void setup() { size(900,600); fill(0); allScores = loadTable("scores.csv","header"); extractdata(allScores); }

Extracting the data void extractdata(Table info) { numOfStudents = info.getRowCount(); quizScores = new int[numOfStudents]; projectScores = new int[numOfStudents]; names = new String[numOfStudents]; for (int i=0;i<numOfStudents;i++){ quizScores[i] = info.getInt(i,2); projectScores[i] = info.getInt(i,1); names[i] = info.getString(i,0); }

Display after keyPressed Before showing code: The key is a char, NOT a String. Also, the user may click simply on a letter and NOT make it uppercase. Need to check for two Strings being equal. – The == will not work! Also, need to space out the display of the information (or do something else to avoid text on top of text).

To make something a String Use the str function. This works for char values and for int values.

Ensure specific case The String class has the toLowerCase and toUpperCase methods. If something already is that case, no problem.

String equality The == does not work, but there is a String method equals, so To compare two Strings, aString and bString, we can code if (aString.equals(bString)) returns true or false.

So, keyPressed void keyPressed () { //key is what is pressed for (int i=0;i<numOfStudents;i++) { String initial = str(names[i].charAt(0)); String keyS = str(key); if ((keyS.equals(initial))||(keyS.equals(initial.toLowerCase()))) { String msg=names[i]+" scored "+str(quizScores[i])+" on the quiz and "+str(projectScores[i]) +" on the project."; text(msg,100,100+i*60); }

The map function The map does a scaling type operation. Processing has an operation called scale that is a coordinate transformation. The map function is great for taking a number in one range and calculating its value transformed into another range. So I use it to produce a graph.

This point has y coordinate 7 in range 0 to 12. I need to calculate the pixel coordinate In range here to here.

Diversion: Reading graphs It may be your job to produce a graph/chart/visualization to communicate data. Reference: unday/the-wrong-way-to-teach-math.html unday/the-wrong-way-to-teach-math.html Challenge: census data indicates percentage of households with telephones. Charts on next page compare Connecticut and Arkansas. Which is a better choice to use?

Is this … a false choice? Only 2 values: 98.9% vs 94.6% OR… should comparison be 1.1% vs 5.4% the percentage of households without telephones OR Should the comparison be between absolute numbers rather than percentages OR ???

Planning: Showing fonts Get a list of the fonts available. Use mousePressed to display a random choice.

String[] fontList ; PFont myfont; void setup() { size(800, 600); fill(255,0,0); fontList = PFont.list(); println(fontList); //prints the whole list }

void draw() { //put in to enable mouse events } void mousePressed() { int ch = int(random(0,fontList.length)); myfont = createFont(fontList[ch],20); textFont(myfont); //set current font text(fontList[ch],mouseX,mouseY); }

Classwork/Homework Look over table examples. Show what you have for midterm project – probably not complete – Always good to work in stages. Finish project and upload.