Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 71 páginas
Examen

Western Governors University ( Programming )COMPUTERS D278 Questions And Answers Rated A+ New Update Assured Satisfaction

Document preview thumbnail
Vista previa 4 fuera de 71 páginas

Western Governors University ( Programming )COMPUTERS D278 Questions And Answers Rated A+ New Update Assured Satisfaction

Vista previa del contenido

1/5/25, 4:56 PM zyBooks




1.1 Programming (general)

Computer program basics

Computer programs are abundant in many people's lives today, carr©yiznygBooouktsa0p1p/0lic5/a2ti5o1n6s:5o6n1703798
Amel Omar
smartphones, tablets, and laptops, powering businesses like Amazon and N e t W
f l i Gx ,UhDe2l 7p 8i nv g1 cars drive
and planes fly, and much more.
A computer program consists of instructions executing one at a time. Basic instruction types are:

Input: A program gets data, perhaps from a file, keyboard, touchscreen, network, etc.
Process: A program performs computations on that data, such as adding two values like x + y.
Output: A program puts that data somewhere, such as to a file, screen, network, etc.

Programs use variables to refer to data, like x, y, and z below. The name is due to a variable's value
"varying" as a program assigns a variable like x with new values.

1.1.1: A basic computer
program.




Computer program
Input (keyboard)
x = Get next input x: 2
2 5
y = Get next input y: 5

z=x+y z: 7
Output (screen)
Put z to output 7




Animation content:
©zyBooks 01/05/25 16:56 1703798
Amel Omar
A generic computer program follows: WGUD278v1
x = Get next input
y = Get next input
z=x+y
Put z to output

Input (keyboard) is as follows:


https://learn.zybooks.com/zybook/WGUD278v1/chapter/1/print 1/71

,1/5/25, 4:56 PM zyBooks

25

Output (screen) is as follows:
7

Animation captions:
01/05/25 16 56 1703798
1. A basic computer program's instructions get input, pr a dp t tp t T s p g a st
Amel Omar
assigns x with what is typed on the keyboard input, in this case 2. WGUD278v1
2. The program's next instruction gets the next input, in this case
3. The program then does some processing, in this case assigning 5. z with x + y (so 2 + 5 yields
7).
4. Finally, the program puts z (7) to output, in this case to a screen.

PARTICIPATIO
N ACTIVITY
1.1.2: A basic computer program.


Consider the example above.

1) How many instructions does the
program have?



Check Show answer


2) Suppose a new instruction were
inserted as follows:

...
z=x+y
Add 1 more to z (new instruction)
Put z to output

What would the last instruction
then output to the screen?
©zyBooks 01/05/25 16:56 1703798
Amel Omar
WGUD278v1
Check Show answer


3) Consider the instruction: z = x + y.
If x is 10 and y is 20, then z is
assigned with .



https://learn.zybooks.com/zybook/WGUD278v1/chapter/1/print 2/71

,1/5/25, 4:56 PM zyBooks




Check Show answer




A program is like a ©zyBooks 01/05/25 16:56 1703798
recipe Amel Omar
WGUD278v1
Some people think of a program as being like a cooking recipe. A recipe consists of
instructions that a chef executes, like adding eggs or stirring ingredients. Likewise,
a computer program consists of instructions that a computer executes, like
multiplying
numbers or outputting a number to a screen.




A first programming activity

Below is a simple tool that allows a user to rearrange some pre-written instructions (in no particular
programming language). The tool illustrates how a computer executes each instruction one at a time,
assigning variable m with new values throughout, and outputting ("printing") values to the screen.


1.1.3: A first programming activity.


Execute the program and observe the output. Click and drag the instructions to change
the order of the instructions, and execute the program again. Not required (points are
awarded just for interacting), but can you make the program output a value greater than
500? How
about greater than 1000?
©zyBooks 01/05/25 16:56 1703798
Run program Amel Omar
WGUD278v1

m:
m = 5

put m


https://learn.zybooks.com/zybook/WGUD278v1/chapter/1/print 3/71

, 1/5/25, 4:56 PM zyBooks
m = m * 2
put m

m = m * m
put m

m = m + 15
put m

©zyBooks 01/05/25 16:56 1703798
Amel Omar
PARTICIPATIO
1.1.4: Instructions. WGUD278v1
N ACTIVITY



1) Which instruction completes the
program to compute a triangle's
area? base = Get next input
height = Get next input
Assign x with base * height

Put x to output
Multiply x by 2
Add 2 to x
Multiply x by 1/2.

2) Which instruction completes the
program to compute the average of
three numbers?
x = Get next input
y = Get next input
z = Get next input

Put a to output
a = (x + y + z) /
3 a = (x + y + z)
/2a=x+y+z

©zyBooks 01/05/25 16:56 1703798
Computational thinking Amel Omar
WGUD278v1
Mathematical thinking became increasingly important throughout the industrial age, to enable people
to successfully live and work. In the information age, many people believe computational
thinking, or creating a sequence of instructions to solve a problem, will become increasingly
important for work and everyday life. A sequence of instructions that solves a problem is called an
algorithm.




https://learn.zybooks.com/zybook/WGUD278v1/chapter/1/print 4/71

Información del documento

Subido en
3 de agosto de 2026
Número de páginas
71
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$13.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Brainarium
3.8
(333)
Vendido
1987
Seguidores
1046
Artículos
23954
Última venta
21 horas hace


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