Summit Middle School classes for Andrew Busch
Andrew Busch - Summit
  • Home
  • Algebra 1
    • Alg 1B - Last Week
    • Alg1B 14 HW - Intro to Functions
    • Alg 1B 11 - Rational Expressions
    • Alg 1B 12 - Radical Expressions
    • Alg 1B 10 v2.0 - Quadratic Functions >
      • 10b Graphing with Pennies - Desmos Tutorial
      • 10i Snowboard Quadratic - Alg1B
      • 10 Quadratics Project
    • Alg 1B 10 Book - Factoring Quadratics
    • Alg 1B 9 - Exponential Functions
    • Alg 1B 8.5 - Representing Data
    • Alg 1B 13 - Inequalities
    • Alg 1B 8 - Best Fit Lines and Linear Regression
    • Alg 1B 7 - Linearity
  • Geometry
    • Geom Last Week
    • Geom 12 - Probability
    • Geom 11 - Circumference, Area, Volume
    • Geom 10-Circles
    • Geom 9 - Right Triangles and Trigonometry
    • Geom 8 - Similarity
    • Geom 7 - Quadrilaterals and Other Polygons
    • Geom 6 - Relationships Within Triangles
    • Geom 5 - Congruent Trianlges
    • Geom 4 - Transformations
    • Geometry 3.5 - Constructions
    • Geom 3 - Parallel and Perpendicular Lines
    • Geom 2 - Reasoning and Proofs
    • Geom 1 - Basics of Geometry
  • Programming
    • Directions for Sharing Programs with Me
    • Hour of Code
    • Intro to Python >
      • Installing and Using Portable Python
      • Introduction to Programming
      • Interactive Storyteller
      • Sophisticated Calculator
      • Getting Started with Games
      • Word Length Frequency
      • Substitution Cipher
      • Simple Game of Paddleball
      • Animating Many Objects
      • Accelerator
      • Applying Trigonometry
      • GIFs
      • Programmatic Art
      • Battleship
      • Pong
      • CodeCademy.com Suggested Work
      • Python Resources
    • Advanced Python >
      • Python Installation
      • Review of Intro to Programming
      • Objects and Classes >
        • More on Classes: Functions, Methods, Inheritance
        • Quadrilaterals
      • tkinter >
        • Paddle Ball
        • Light Bike
        • Frogger
        • Snake Game
        • Breakout
      • Reading and Writing Files
      • Directories and Importing Modules
      • Raspberry Pi
      • API's
      • Python Puzzles
  • Clubs
  • Graphing Calculator
  • PARCC Practice

Review--i.e. You Should Know This Stuff Because We're Going to Use These Ideas Quite a Bit.

It's time to dust out those cobwebs. Let's start by building a basic calculator program. This program should bring to mind things we learned together in Intro to Programming--it doesn't require anything new from you.
Through this module, you should demonstrate that you understand how to:
1) define and use variables
2) define and call functions
3) prompt the user for information
4) use if-statements
5) pass arguments into functions
6) COMMENT YOUR CODE!

Directions:
1) Start a new module and use our normal file-naming convention: Calculator_YourLastName_YourFirstName.
2) This calculator program should ask the user what operation they would like to perform, ask them for two numbers and then print the result.
3) Each operation should be its own function.
If you want to set out the basic structure of your program without having to go into the details of each function right away, you can write "pass" in the body of the function.
    i.e. def function():
               pass
4) If the user enters values which will not work for either the choice given or the operation performed, I want your program to prompt the user for appropriate choices.
5) #COMMENT THE LIVING DAYLIGHTS OUT OF THIS PROGRAM.
One of the major advantages of using Python is its readability. Commenting helps improve the readability of code. If you're not commenting, it kind of defeats the purpose of using Python.
6) Rewrite your program so that the numbers the user chooses are passed as arguments into the operation functions.

Powered by Create your own unique website with customizable templates.