Rédigé par des étudiants ayant réussi Disponible immédiatement après paiement Lire en ligne ou en PDF Mauvais document ? Échangez-le gratuitement 4,6 TrustPilot
logo-home
Examen

Exam (elaborations) wgu c949

Note
-
Vendu
-
Pages
18
Qualité
A+
Publié le
17-10-2024
Écrit en
2024/2025

WGU C949 Data Types STUDY GUIDE and answers ArrayA data structure that stores an ordered list of items, with each item is directly accessible by a positional index. Linked ListA data structure that stores ordered list of items in nodes, where each node stores data and has a pointer to the next node. Bianary Search TreeA data structure in which each node stores data and has up to two children, known as a left child and a right child. Hash TableA data structure that stores unordered items by mapping (or hashing) each item to a location in an array (or vector). Abstract Data Type (ADT)A data type described by predefined user operations, such as "insert data at rear," without indicating how each operation is implemented. ListAn ADT for holding ordered data. Dups ok Sequence type: A mutable container with ordered elements. Underlying data structures: Array, linked list Array in Javageneric class that supports different data types. declared as follows, where T is the data type. TupleSequence type: An immutable container with ordered elements. StackAn ADT in which items are only inserted on or removed from the top of a

Montrer plus Lire moins
Établissement
Wgu C949
Cours
Wgu c949

Aperçu du contenu

WGU C949 Data Structures &
Algorithms Chapters 1-4 questions and
answers
In-line, Multiline, Documentation Strings (Docstrings)✔✔In Python, there are three
(3) different types of commenting styles. What are they?

In-line✔✔"Comments used to add meaning to a program and explain logic in-line
with the code being discussed. These comments are good for quick explanations
and are indicated by using the # character and a space. if n % 2 == 1: # n is odd"

Multiline✔✔"Comments, also known as block comments, are good for more in-depth
explanations or when you want to comment a complex section of code. In Python we
append together a section of lines all beginning with the # character to achieve this.
# This section of code # Requires a longer comment # So we can add as many lines
as needed"

Document Strings (Docstrings)✔✔"These are used like the comments referenced
above but it allows you much more space to write a longer message and they can be
written out at runtime, which means the interpreter does see them, unlike other types
of comments. These should be used to describe what a piece of code is doing in
detail. You enclose these types of comments in three quote marks """""".

def odd_function(n)✔✔""""""This function checks to see whether a number is odd or
even"""""""

Computer program✔✔Consists of instructions that a computer executes (or runs),
like multiplying numbers or printing a number to a screen.

Task decomposition✔✔Means to reduce a complex task into simpler basic steps,
making the whole task easier to solve.

Algorithm✔✔Is a methodical step-by-step procedure to perform a task.

Computational thinking✔✔The method of evaluating a problem's most basic parts
and then creating an algorithm to solve that problem.

Python interpreter✔✔For Python, an application that can be used on various
operating systems, including Microsoft Windows, Linux, and MacOS.

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

Code (Coding)✔✔A common word for the textual representation of a program.

Line✔✔A row of text.

,The interactive interpreter displays a prompt(">>>")✔✔(">>>") that indicates the
interpreter is ready to accept code.

Prompt✔✔Informs the programmer that the interpreter is ready to accept commands.

statement✔✔A program instruction.

True✔✔True or false. A program mostly consists of a series of statements, each
statement usually appears on its own line.

Expression✔✔Code that returns a value when evaluated; for example, the code
wage * hours * weeks is an expression that computes a number. * is the symbol for
multiplication. The names wage, hours, weeks, and salary are variables, which are
named references to values stored by the interpreter.

assignment✔✔A new variable is created by performing an ___________ using the =
symbol, such as salary = wage * hours * weeks, which creates a new variable called
salary.

print()✔✔Displays variables or expression values.

comments✔✔#' characters denote ____________, which are optional but can be
used to explain portions of code to a human reader.

print()✔✔The primary way to print output is to us the built-in function _________.

string literal✔✔Text enclosed in quotes is known as a ...

False✔✔True or False. Text in string literals may not have letters, numbers, spaces,
or symbols like "@" or "#".

print('Hello', end = ' ')✔✔Multiple print statements will each print on a new output line.
How would you keep the next print's output on the same line separated by a single
space?

True✔✔True or False. A string literal can be surrounded by matching single or
double quotes: 'Python rocks!' or "Python rocks!". Good practice is to use single
quotes for shorter strings, and double quotes for more complicated text or text that
contains single quotes (such as print("Don't eat that!")).

"print('Halt!', end = ' ') print('No access!')"✔✔Write code that will print "Halt!" and "No
access!" on a single line.

print('Welcome!')✔✔Write code that will print: Welcome!

print(num_cars)✔✔Given the variable num_cars = 9, write a statement that prints 9.

, "wage = 20 print('Wage:' , wage) #Comma separates multiple items
print('Goodbye.')"✔✔"Write code that prints the following: Wage: 20 Goodbye."

You are 22 years old.✔✔"Assume variable age = 22 What is the output of print('You
are' , age, 'years old.')"

newline character✔✔A new line can also be output by inserting \n, known as a
______________ ___________, within a string literal.

input()✔✔Reading input is achieved using the ________ function.

num_cars = input()✔✔Write a statement that reads a user-entered string into
variable num_cars.

type✔✔Determines how a value can behave.

my_var = int('15')✔✔Type a statement that converts the string '15' to an integer, and
assigns the result to my_var.

my_var + 5✔✔"Complete the code so that new_var is equal to the entered number
plus 5. my_var = int(input()) new_var = _______"

syntax error✔✔A type of error that violates a programming language's rules on how
symbols can be combined to create a program.

runtime error✔✔A type of error wherein 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').

crash✔✔Abrupt and unintended termination of a program.

SyntaxError✔✔The program contains invalid code that can not be understood.

IndentationError✔✔The lines of the program are not properly indented.

ValueError✔✔An invalid value is used - can occur if giving letters to int().

NameError✔✔The program tries to use a variable that does not exist.

TypeError✔✔An operation uses incorrect types - can occur if adding an integer to a
string.

TypeError✔✔What type of error: lyric = 99 + "" bottles of pop on the wall"""

IndentationError✔✔What type of error: print(""Friday, Friday"")"

ValueError✔✔What type of error: int(""Thursday"")"

École, étude et sujet

Établissement
Wgu c949
Cours
Wgu c949

Infos sur le Document

Publié le
17 octobre 2024
Nombre de pages
18
Écrit en
2024/2025
Type
Examen
Contenu
Questions et réponses

Sujets

$13.49
Accéder à l'intégralité du document:

Mauvais document ? Échangez-le gratuitement Dans les 14 jours suivant votre achat et avant le téléchargement, vous pouvez choisir un autre document. Vous pouvez simplement dépenser le montant à nouveau.
Rédigé par des étudiants ayant réussi
Disponible immédiatement après paiement
Lire en ligne ou en PDF

Faites connaissance avec le vendeur
Seller avatar
ExamZen

Document également disponible en groupe

Thumbnail
Package deal
WGU C949 Data Types STUDY GUIDE and answers PACKAGE
-
7 2024
$ 30.96 Plus d'infos

Faites connaissance avec le vendeur

Seller avatar
ExamZen Liberty University
Voir profil
S'abonner Vous devez être connecté afin de pouvoir suivre les étudiants ou les formations
Vendu
16
Membre depuis
1 année
Nombre de followers
3
Documents
539
Dernière vente
1 mois de cela

0.0

0 revues

5
0
4
0
3
0
2
0
1
0

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Vous travaillez sur vos références ?

Créez des citations précises en APA, MLA et Harvard avec notre générateur de sources gratuit.

Vous travaillez sur vos références ?

Foire aux questions