Agnostic Programming: Learning to Design and Test Basic by Kinga Laura Dobolyi

By Kinga Laura Dobolyi

Agnostic Programming: studying to layout and attempt uncomplicated Programming Algorithms is written for newbies who are looking to examine easy programming innovations with no the main points of any specific programming language. instead of an in-depth dialogue of programming syntax and pointless definitions, this brief ebook introduces the middle, foundational programming constructs with a test-driven method. brief, yet hard programming routines are came across on the finish of each bankruptcy. a superb first programming ebook for college kids who will proceed to software in a number of languages, with a heavy concentrate on challenge fixing and checking out.

Show description

Read or Download Agnostic Programming: Learning to Design and Test Basic Programming Algorithms PDF

Best introductory & beginning books

Introduction to Stellar Astrophysics: Basic stellar observations and data

This textbook creation to the elemental components of primary astronomy and astrophysics serves as a origin for knowing the constitution, evolution, and saw homes of stars. the 1st half the publication explains how stellar motions, distances, luminosities, colours, radii, lots and temperatures are measured or derived.

Additional resources for Agnostic Programming: Learning to Design and Test Basic Programming Algorithms

Example text

Wait…don’t answer that). Or was there something wrong with the way we picked our test inputs? Since this type of testing cannot prove the absence of bugs, we are going to have to be more careful about how to pick our test cases. Because even with an infinitely-sized test suite, it is possible we will not catch the bug we’re looking for, we have to choose test cases that will reveal as much information as possible. But how do we do this without knowing a priori where and what the bugs are (and without having the code written)?

Tile1 = get the first tile from the user 2. tile2 = get the second tile from the user 3. row1 = (tile1 – 1) // w 4. row2 = (tile2 – 1) // w 5. return row1 – row2 Are you going to come back in a year and remember what w stood for? Probably not. It would have been better if the person who stored the width called it that. 5 above, stored the value of w in another value called width (so width = w), and then just used the value width after that in the rest of your calculations. 12. 1. number1 = get the first number from the user 2.

Return remainder 5. 1. radius = get the radius from the user 2. 14 3. return area 7. 1. number = get the number from the user 2. remainder = number % 2 3. return remainder 9. 1. number = get the number from the user 2. product1 = number x 3 3. product2 = product1 x 3 4. product3 = product2 x 3 5. result = product1 + “ “ + product2 + “ “ + product3 6. a. 1. tile = get the tile from the user 2. return ((tile – 1) // w) + 1 Recall that width, w, was a value that was previously stored, so we have access to it.

Download PDF sample

Rated 4.11 of 5 – based on 15 votes