Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

D278 Study QUESTIONS AND VERIFIED SOLUTIONS

Beoordeling
-
Verkocht
-
Pagina's
4
Cijfer
A+
Geüpload op
12-08-2025
Geschreven in
2025/2026

What is the purpose of a variable? (L2) -To store data in a named memory location that can be used and changed during program execution. How do you save a value to a variable? (L2) -By using the assignment operator (=), e.g., x = 5 stores the value 5 in variable x. What is a programming expression? (L2) -A combination of variables, values, and operators that evaluates to a single result. What is an identifier? (L2) -The name used to identify a variable, function, or other element in code. What constitutes a valid identifier? (L2) -A valid identifier starts with a letter or underscore, followed by letters, digits, or underscores; it cannot be a keyword. What is a literal? (L2) -A literal is a fixed value written directly in code, like 5, 'A', or "hello". What is an operator? (L2) -An operator is a symbol that performs an action on one or more operands, such as +, -, or *. What precedence rules does programming use? (L2)

Meer zien Lees minder
Instelling
D278
Vak
D278

Voorbeeld van de inhoud

D278 Study QUESTIONS AND VERIFIED SOLUTIONS
What is the purpose of a variable? (L2) -✔✔To store data in a named memory location that
can be used and changed during program execution. How do you save a value to a
variable? (L2) -✔✔By using the assignment operator (=), e.g., x = 5 stores the value 5 in
variable x. What is a programming expression? (L2) -✔✔A combination of variables, values,
and operators that evaluates to a single result. What is an identifier? (L2) -✔✔The name
used to identify a variable, function, or other element in code. What constitutes a valid
identifier? (L2) -✔✔A valid identifier starts with a letter or underscore, followed by letters,
digits, or underscores; it cannot be a keyword. What is a literal? (L2) -✔✔A literal is a fixed
value written directly in code, like 5, 'A', or "hello". What is an operator? (L2) -✔✔An
operator is a symbol that performs an action on one or more operands, such as +, -, or *.
What precedence rules does programming use? (L2) -✔✔Operators follow specific
precedence rules; for example, multiplication and division are evaluated before addition
and subtraction. How does an integer differ from a float? (L2) -✔✔An integer is a whole
number with no decimal, while a float is a number that includes a decimal point. What
happens if you divide two integers? A integer and float? (L2) -✔✔Dividing two integers gives
a float. Dividing an integer by a float also gives a float. What happens if you divide a
nonzero floating point number by zero? (L2) -✔✔It results in positive or negative infinity, or
an error, depending on the programming language. How do you convert an item's type? (L2)
-✔✔By using type casting functions like int(), float(), or str() to convert between types.
What does the modulo operator do? (L2) -✔✔It returns the remainder of a division, e.g.,
7 % 3 equals 1. What is the difference in a variable and a constant? (L2) -✔✔A variable's
value can change; a constant's value stays the same throughout the program. How does
an array work? (L2) -✔✔An array stores multiple values of the same type in a single,
indexed collection. What does index reference? (L2) -✔✔An index references the position
of an element in an array, starting at 0. What is the purpose of each different data type?
(L2) -✔✔Different data types (int, float, char, string, etc.) define the kind of data a variable
can hold and how it's used in operations. How does a branch differ from a loop? (L3) -✔✔A
branch chooses between actions once; a loop repeats actions while a condition is true.
How does an if-else branch work? (L3) -✔✔It checks a condition; if true, one block runs,
else another block runs. What does the equality operator do? Does it work for all data
types? (L3) -✔✔It checks if two values are equal (==); it works for most data types but may
behave differently with complex types. What are the four relational operators? (L3) -✔✔<
(less than), > (greater than), <= (less than or equal), >= (greater than or equal). What are the

Geschreven voor

Instelling
D278
Vak
D278

Documentinformatie

Geüpload op
12 augustus 2025
Aantal pagina's
4
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€13,36
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
mikemuisyo1968

Maak kennis met de verkoper

Seller avatar
mikemuisyo1968 Chamberlain College Of Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
9 maanden
Aantal volgers
0
Documenten
148
Laatst verkocht
-

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen