100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Respuestas

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

Puntuación
-
Vendido
7
Páginas
12
Subido en
11-05-2018
Escrito en
2017/2018

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.

Institución
Grado









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
11 de mayo de 2018
Número de páginas
12
Escrito en
2017/2018
Tipo
Respuestas
Personaje
Desconocido

Temas

Vista previa del contenido

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
$5.24
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
kaylenpillay

Conoce al vendedor

Seller avatar
kaylenpillay University of South Africa (Unisa)
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
7
Miembro desde
7 año
Número de seguidores
6
Documentos
2
Última venta
7 meses hace

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes