1 / 49

Fresh Technologies for Intro to Programming

Fresh Technologies for Intro to Programming. RAPTOR. Tony Gaddis. My Two Types of Students. Whiz Kids. Strugglers. RAPTOR. A flowchart-based programming environment Developed at the US Air Force Academy Freely available. http://raptor.martincarlisle.com. Program output.

ellema
Download Presentation

Fresh Technologies for Intro to Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fresh Technologies for Intro to Programming RAPTOR Tony Gaddis

  2. My Two Types of Students Whiz Kids Strugglers

  3. RAPTOR • A flowchart-based programming environment • Developed at the US Air Force Academy • Freely available http://raptor.martincarlisle.com

  4. Program output Variable watch window

  5. Procedure tabs Procedure calls

  6. Comments

  7. Object-Oriented RAPTOR In Beta

  8. Benefits of using RAPTOR • Helps students understand the abstract nature of programming • They see a logical design become a running program • Helps students understand flow control • Enforces structured programming

  9. RAPTOR in the Curriculum • Throughout a Programming Logic course • As part of a CS1 course featuring a language • As a module in a computer literacy course

  10. RAPTOR included!

  11. Interpreted language • Object-oriented or procedural • Dynamic typing • Easy to learn, yet industrial strength • Free! www.python.org

  12. Clean, Simple Syntax Java Hello World Program public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } String literals can be enclosed in either single or double quotes. No end of statement punctuation Python Hello World Program print "Hello World!"

  13. if Statements if temperature < 40: print "A little cold, huh?" if temperature < 40: print "A little cold, huh?" else: print "Nice weather we're having." Indentation is required! if temperature < 40: print "A little cold, huh?" elif temperature < 60: print "Just a bit chilly." elif temperature < 90: print "Nice weather we're having." else: print "Turn up the air conditioning!"

  14. Loops count = 0 while count < 10: print "Hello World!" count += 1 Indentation is required! for x in range(10): print "Hello World!"

  15. Functions def calcPay(): hours = input("How many hours did you work? ") payRate = input("What is your hourly pay rate? ") grossPay = hours * payRate print "Your gross pay is", grossPay calcPay() How many hours did you work? 20 What is your hourly pay rate? 10 Your gross pay is 200

  16. Lists Instead of Arrays numbers = [99, 100, 101, 102] for n in numbers: print n numbers = [99, 100, 101, 102] index = 0 while index <= 3: print numbers[index] index += 1

  17. Classes class Car: def __init__(self, make, model): self.__make = make self.__model = model def getMake(self): return self.__make def getModel(self): return self.__model myCar = Car("Ford", 2008) print myCar.getModel(), myCar.getMake() 2008 Ford

  18. Interactive Mode >>> count = 5 >>> while count > 0: print count count = count - 1 5 4 3 2 1 >>> print count 0 >>>

  19. IDLE and Other IDEs • Python comes with an IDE named IDLE • Eliminates need to access OS command line • Colorized code editor • Debugger • Provides interactive mode interpreter • Other IDEs available too • ActivePython • PyDev (Eclipse plug-in)

  20. GUI Programming in Python

  21. A Few Benefits of using Python • The clean, simple syntax is easy to learn. • No required classes, functions, or static methods • No semicolons, etc. • No braces, or other block delimiters • Can be procedural or object-oriented. • Indentation becomes a habit when you have to do it! • The interpreter acts as a "workbench."

  22. Python in the Curriculum • As the language component in a Programming Logic course • As the main language in CS1 • Advanced courses

  23. Game Development Kit • Library for Visual C++ 2008 • Functions only (no classes or objects) • Simple enough for absolute beginners • Free download gdk.thegamecreators.com

  24. #include "DarkGDK.h" void DarkGDK() { // Draw a circle. dbCircle(200, 120, 50); // Wait for the user to press a key. dbWaitKey(); }

  25. #include "DarkGDK.h" void DarkGDK() { // Load image #1. dbLoadImage("beach.jpg", 1); // Display image #1 at (0,0) dbPasteImage(1, 0, 0); // Wait for the user to press a key. dbWaitKey(); }

  26. The Dark GDK provides: • 2D primitive graphics (lines, circles, boxes, etc) • Image manipulation • Sprite and animation support • Collision detection • Ability to play audio files • Much more, including 3D!

  27. C++ and the Dark GDK can be used: • to teach traditional CS1 topics • in a very non-traditional way! • Students are motivated and inspired by graphics and games

  28. Students work in a graphical environment instead of the console.

  29. Students learn loops by drawing patterns.

  30. Students learn to use loops for scanning the pixels in an image.

  31. Students learn interesting calculations, such as the simulation of falling objects.

  32. Students can use arrays to create card games. Sorting and shuffling algorithms become especially meaningful!

  33. Students use two-dimensional arrays to create tile-mapped background images.

  34. Students can use simple if statements to detect collisions between graphical elements. if ( dbSpriteCollision(ROBOT, PIZZA) ){ // Process the collision.}

  35. In addition to simple keyboard input, students also learn to read mouse input.

  36. Students can use the Dark GDK for image manipulation.

  37. Complete interactive video games!

  38. Complete interactive video games!

  39. Students can't create their own artwork?No Problem! • Students can download a collection of artwork and audio files to use in their projects.

  40. Questions? Programming: It's not just for Whiz Kids anymore.

More Related