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
Examen

Introduction to Programming in Python - C859 (WGU C859 Actual Exam) (Comprehensive Document for Exam Preparation)

Puntuación
-
Vendido
-
Páginas
35
Grado
A+
Subido en
03-09-2024
Escrito en
2024/2025

Introduction to Programming in Python - C859 (WGU C859 Actual Exam) (Comprehensive Document for Exam Preparation)

Institución
ATI
Grado
ATI

Vista previa del contenido

Python WGU C859

Version 1



Programming Chapter One



1. Program: consists of instructions executing one at a time. Basic
instruction types are:



Input: A program receives data 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 a file, screen, or
network.



2. algorithm: A sequence of instructions that solves a problem



3. Python Interpreter: a computer program that executes code written in
the Python programming language



4. Interactive interpreter: a program that allows the user to execute one
line of code at a time.



5. Code: a common word for the textual representation of a program (and
hence programming is also called coding). A line is a row of text.

,6. Statement: is a program instruction. A program mostly consists of a
series of statements, and each statement usually appears on its own line.



7. Expressions: are code that return a value when evaluated; for example,
the code

wage * hours * weeks is an expression that computes a number. The symbol
* is

used for multiplication. The names wage, hours, weeks, and salary are
variables,

which are named references to values stored by the interpreter.



8. New Variable: is created by performing an assignment using the =
symbol, such

as salary = wage * hours * weeks, which creates a new variable called salary.



9. print() function: displays variables or expression values.



10. string literal: Text enclosed in quotes is known as



11. end=' ': inside of print() to keep the output of a subsequent print
statement on

the same line separated by a single space.



12. newline character: Output can be moved to the next line by printing "\
n". Ex:

print('1\n2\n3') prints "1" on the first line, "2" on the second line, and "3" on
the third

line of output. "\n" consists of two characters, \ and n, but together are
considered

by the Python interpreter as a single character.

,13. whitespace: Any space, tab, or newline



14. input(): Reading input is achieved using. The statement best friend =
input()

will read text entered by the user and the best friend variable is assigned
with the

entered text. The function input() causes the interpreter to wait until the user
has

entered text and pushed the return key.



15. string: The input obtained by input() is any text that a user typed,
including

numbers, letters, or special characters such as # or @. Such text in a
computer

program is called



16. type: The string '123' (with quotes) is fundamentally different from the
integer

123 (without quotes). The '123' string is a sequence of the characters '1', '2',
and '3'

arranged in a certain order, whereas 123 represents the integer value one-
hundred

twenty-three. Strings and integers are each an example of... a type
determines how

a value can behave



17. int(): Reading from input always results in a string type. However, often
a

, programmer wants to read in an integer, and then use that number in a
calculation. If

a string contains only numbers, like '123', then the... function can be used to
convert

that string to the integer 123.



18. Syntax error: violates a programming language's rules on how symbols
can be

combined to create a program. An example is putting multiple prints on the
same

line.



19. runtime error: in which a program's syntax is correct but the program
attempts

an impossible operation, such as dividing by zero or multiplying strings
together (like

'Hello' * 'ABC').



20. Common Errors: Indentation Error - The lines of the program are not
properly

indented.

Value Error - An invalid value is used, which can occur if giving letters to int().

Name Error - The program tries to use a variable that does not exist.

Type Error - An operation uses incorrect types, which can occur if adding an
integer

to a string.



21. logic error: Some errors may be subtle enough to silently misbehave,
instead

Escuela, estudio y materia

Institución
ATI
Grado
ATI

Información del documento

Subido en
3 de septiembre de 2024
Número de páginas
35
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$10.49
Accede al documento completo:

¿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

Conoce al vendedor

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.
BESTNURSING Walden University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
20
Miembro desde
5 año
Número de seguidores
19
Documentos
718
Última venta
9 meses hace

4.0

1 reseñas

5
0
4
1
3
0
2
0
1
0

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