100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Basic Programming Principles (2nd Edition) Chapter 3 Exercise Answers R80,00
Add to cart

Answers

Basic Programming Principles (2nd Edition) Chapter 3 Exercise Answers

 1718 views  6 purchases

Basic Programming Principles 2nd Edition by CM Pretorius and HG Erasmus. Insightful answers to the chapter questions. Really helpful for exams and assignments. Provides sequential steps to assist chapter answers.

Preview 2 out of 12  pages

  • May 11, 2018
  • 12
  • 2017/2018
  • Answers
  • Unknown
  • ict1511
All documents for this subject (5)
avatar-seller
kaylenpillay
Chapter 3 Answers

Exercises Page 48

Question 1

1.1

Planning:
Description Type Variable name
Input Name of item string name
Price of item real price
Output Name of item String name
Price of item real price

IPO chart:
Input Processing Output
name Prompt for input data name
price Enter input data price
Display output data

Algorithm:

ShowItemData
~ get the input
display “Provide the name” ~ on new line
enter name
display “Provide the price” ~ on new line
enter price
~ show output on screen
display “The name of the item is “, name ~ on new line
display “The price of the item is R”, price ~ on new line
end

Trace Table:

Test data: name = t-shirt and price = R29.70

Instruction name price output
display Provide the name
enter t-shirt
display Provide the price
enter 24.70
display The name of the item is t-shirt
display The price of the item is R29.70




Basic Programming Principles Second Edition Chapter 3 Answers
Page 1 of 12

, 1.2

Planning:
Description Type Variable name
Input First number integer number1
Second number integer number2
Output Sum of numbers integer sum
Difference between numbers integer difference
Product of numbers integer product

IPO chart:
Input Processing Output
number1 Prompt for 2 numbers sum
number2 Enter input numbers difference
Calculate output values product
Display output values

Algorithm:

ShowItemData
~ get the input
display “Provide the first number” ~ on new line
enter number1
display “Provide the second number” ~ on new line
enter number2
~ do calculations
sum = number1 + number2
difference = number1 – number2
product = number1 * number2
~ show output on screen
display “The sum is “, sum ~ on new line
display “The difference is ”, difference ~ on new line
display “The product is “, product ~ on new line
end

1.3

Planning:
Description Type Variable name
Input Number chairs per row Integer chairs
Number of rows integer rows
Output Total number of chairs integer totalChairs

IPO chart:
Input Processing Output
chairs Prompt for input data totalChairs
rows Enter input data
Calculate totalChairs
Display totalChairs


Basic Programming Principles Second Edition Chapter 3 Answers
Page 2 of 12

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller kaylenpillay. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R80,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

53022 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R80,00  6x  sold
  • (0)
Add to cart
Added