• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 24 páginas
Examen

WGU D335 Introduction To programming In Python – Questions With Comprehensive Solutions

Document preview thumbnail
Vista previa 3 fuera de 24 páginas

WGU D335 Introduction To programming In Python – Questions With Comprehensive Solutions

Vista previa del contenido

WGU D335 Introduction To programming In
Python – Questions With Comprehensive
Solutions
Python interpreter Correct Answer - a computer program that
executes code written in the Python programming language

Prompt Correct Answer - >>> inticates the interpreter is ready
to accept code

Statement Correct Answer - program instruction

A program mostly consists of a series of statements, and each
statement usually appears on its own line

Comment character Correct Answer - #

Outputting multiple items with one statement Correct Answer -
use a comma to seperate
ex) print('wage: ', wage)

Newline characters Correct Answer - \n
ex) ('1\n2\n3') prints
1
2
3

Print() can also be used to create a newline

What is the purpose of end=' ' Correct Answer - by default in
python each print statement starts a new line, end=' ' indicates that
it should instead put the next print on the same line following a
space

,Input function Correct Answer - input()

Gets input from the user

Converting user input to integer Correct Answer - using int()
ex)
my_string = '123'
my_int = int('123')

Input prompt Correct Answer - Adding a string inside the
parentheses of input() displays a prompt to the user before waiting
for input
ex)
hourly_wage = int(input('Enter hourly wage: '))
will display Enter hourly wage: and wait for input

Default input will be string and only requires input()

Syntax errors Correct Answer - to violate 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.

Runtime errors Correct Answer - 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').

IDEs Correct Answer - integrated development environment
embeds a python interpreter so that the reader may experiment
with python programming

IDLE is the official python IDE

How to type a backslash (\) Correct Answer - \\

, One backslash thinks you are going to start a newline

Python 3 reserved words Correct Answer -

Value Correct Answer - a value such as 20, abcdef, or 55

Type Correct Answer - the type of object such as a string or
integer

Identity Correct Answer - identifier that describes the object

Mutability Correct Answer - indicates if the objects value is
allowed to change

Integers and strings are immutable; modifying their values with
assignment statements results in new objects being created and the
names bound to the new object

Must change entire string to change character
ex) alphaber[1] = 'C' is not allowed

Print an objects type Correct Answer - print(type(x))

Print an objects identity Correct Answer - print(id(x))

Prints a large number that is the unique location in memory where
the object is stored

Floating point literal Correct Answer - a fraction of a float
ex) 1.1 or 1.0 or 1.212

Overflow error Correct Answer - Error from attempting to
represent a number that is too large.

Información del documento

Subido en
5 de julio de 2025
Número de páginas
24
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$23.49

¿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.
LeCrae
4.0
(448)
Vendido
2149
Seguidores
1409
Artículos
22712
Última venta
1 día 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