Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 3 pages
Exam (elaborations)

Programming Logic and Design - CH 2 Questions and Answers

Document preview thumbnail
Preview 1 out of 3 pages

Programming Logic and Design - CH 2 Questions and Answers

Content preview

Programming Logic and Design - CH 2
Questions and Answers

A string literal is usually enclosed inside a set of what characters? - ANSWER-
Quotation marks

What is a variable? - ANSWER-A storage location in memory that is represented by
a name.

Summarize three common rules for naming variables. - ANSWER-• Variable names
must be one word. They cannot contain spaces.
• In most languages, punctuation characters cannot be used in variable names. It is
usually a good idea to use only alphabetic letters and numbers in variable names.
• In most languages, the first character of a variable name cannot be a number.

What variable naming convention do we follow in this book? - ANSWER-camelCase

Look at the following pseudocode statement:
Input temperature
What happens when this statement executes? - ANSWER-• The program pauses
and waits for the user to type something on the keyboard, and
then press theekey.
• When the ekey is pressed, the data that was typed is stored in the temperature
variable.

Who is the user? - ANSWER-Any hypothetical person that is using a program and
providing input for it.

What is a prompt? - ANSWER-A message that tells (or asks) the user to enter a
specific value.

What two steps usually take place when a program prompts the user for input? -
ANSWER-1. Display a prompt on the screen.
2. Read a value from the keyboard.

What does the term user-friendly mean? - ANSWER-The term user-friendly is
commonly used in the software business to describe programs
that are easy to use.

What is an assignment statement? - ANSWER-A statement that sets a variable to a
specified value.

When you assign a value to a variable, what happens to any value that is
already stored in the variable? - ANSWER-It is replaced.

Summarize the mathematical order of operations, as it works in most

Document information

Uploaded on
March 22, 2025
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
lectknancy
3.8
(80)
Sold
327
Followers
27
Items
26139
Last sold
4 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions