Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 2, Problem 16MC
Assigning a value to a variable in a declaration statement is called _____.
- a. allocation
- b. initialization
- c. certification
- d.
programming style
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
*program must be made in C# using visual studio*
You will be creating a program that will allow the user to enter information about a home rental. The program should allow them to enter the name of the rental, the number of months the rental will be used, the cost per a single month and the total budget allowed to rent. There should be a button that will then calculate the total cost of the rental, as well as output the name, number of months, individual cost and total cost of the rental each in their own label. In addition, there should be a label that lets the user know if the rental would be over or under the budget entered. The number of months will need to be entered as a number between 0 and 13. If they enter a number outside of that range, when the calculation button is clicked a label should show up letting the user know the number of months entered was not in the correct range. A similar check should be performed for the individual cost and budget, one that ensures a number…
True or False 6. In languages that require variable declarations, a variable’s declaration must appear before any other statements that use the variable.
True or False You can declare multiple variables of different data types with one declaration.
Chapter 2 Solutions
Starting Out with Programming Logic and Design (4th Edition)
Ch. 2.1 - Who is a programmers customer?Ch. 2.1 - What is a software requirement?Ch. 2.1 - What is an algorithm?Ch. 2.1 - What is pseudocode?Ch. 2.1 - Prob. 2.5CPCh. 2.1 - Prob. 2.6CPCh. 2.2 - Prob. 2.7CPCh. 2.2 - Prob. 2.8CPCh. 2.2 - What is a sequence structure?Ch. 2.2 - Prob. 2.10CP
Ch. 2.2 - Prob. 2.11CPCh. 2.2 - Prob. 2.12CPCh. 2.2 - Summarize three common rules for naming variables.Ch. 2.2 - Prob. 2.14CPCh. 2.2 - Look at the following pseudocode statement: Input...Ch. 2.2 - Prob. 2.16CPCh. 2.2 - Prob. 2.17CPCh. 2.2 - What two steps usually take place when a program...Ch. 2.2 - What does the term user-friendly mean?Ch. 2.3 - Prob. 2.20CPCh. 2.3 - When you assign a value to a variable, what...Ch. 2.3 - Summarize the mathematical order of operations, as...Ch. 2.3 - Prob. 2.23CPCh. 2.3 - Prob. 2.24CPCh. 2.4 - What two items do you usually specify with a...Ch. 2.4 - Does it matter where you write the variable...Ch. 2.4 - What is variable initialization?Ch. 2.4 - Prob. 2.28CPCh. 2.4 - What is an uninitialized variable?Ch. 2.7 - Prob. 2.30CPCh. 2.7 - Prob. 2.31CPCh. 2.7 - Prob. 2.32CPCh. 2 - A error does not prevent the program from running,...Ch. 2 - Prob. 2MCCh. 2 - A(n) _______ is a set of well-defined logical...Ch. 2 - An informal language that has no syntax rules, and...Ch. 2 - A ____ is a diagram that graphically depicts the...Ch. 2 - Prob. 6MCCh. 2 - Prob. 7MCCh. 2 - Prob. 8MCCh. 2 - Prob. 9MCCh. 2 - A(n) _____ is a message that tells (or asks) the...Ch. 2 - A(n) ________ sets a variable to a specified...Ch. 2 - In the expression 12 + 7, the values on the right...Ch. 2 - A(n) _____ operator raises a number to a power. a....Ch. 2 - A(n) _________ operator performs division, but...Ch. 2 - A(n) ____ specifies a variable's name and data...Ch. 2 - Assigning a value to a variable in a declaration...Ch. 2 - Prob. 17MCCh. 2 - Prob. 18MCCh. 2 - A debugging process in which you imagine that you...Ch. 2 - Prob. 20MCCh. 2 - Programmers must be careful not to make syntax...Ch. 2 - In a math expression, multiplication and division...Ch. 2 - Variable names can have spaces in them.Ch. 2 - In most languages, the first character of a...Ch. 2 - Prob. 5TFCh. 2 - In languages that require variable declarations, a...Ch. 2 - Uninitialized variables are a common cause of...Ch. 2 - The value of a named constant cannot be changed...Ch. 2 - Hand tracing is the process of translating a...Ch. 2 - Prob. 10TFCh. 2 - What does a professional programmer usually do...Ch. 2 - What is pseudocode?Ch. 2 - Computer programs typically perform what three...Ch. 2 - What does the term user-friendly mean?Ch. 2 - What two things must you normally specify in a...Ch. 2 - What value is stored in uninitialized variables?Ch. 2 - Design an algorithm that prompts the user to enter...Ch. 2 - Design an algorithm that prompts the user to enter...Ch. 2 - Write assignment statements that perform the...Ch. 2 - Assume the variables result, x, y, and z are all...Ch. 2 - Write a pseudocode statement that declares the...Ch. 2 - Write a pseudocode statement that declares the...Ch. 2 - Write a pseudocode statement that assigns the...Ch. 2 - Write a pseudocode statement that assigns the sum...Ch. 2 - Write a pseudocode statement that subtracts the...Ch. 2 - Write a pseudocode statement that multiplies the...Ch. 2 - If the following pseudocode were an actual...Ch. 2 - Prob. 12AWCh. 2 - If the following pseudocode were an actual...Ch. 2 - If the programmer translates the following...Ch. 2 - The following code will not display the results...Ch. 2 - Find the error in the following pseudocode....Ch. 2 - Find the error in the following pseudocode....Ch. 2 - Find the error in the following pseudocode....Ch. 2 - Find the error in the following pseudocode....Ch. 2 - Personal Information Design a program that...Ch. 2 - Sales Prediction A company has determined that its...Ch. 2 - Land Calculation One acre of land is equivalent to...Ch. 2 - Total Purchase A customer in a store is purchasing...Ch. 2 - Distance Traveled Assuming there are no accidents...Ch. 2 - Sales Tax Design a program that will ask the user...Ch. 2 - Miles-per-Gallon A cars miles-per-gallon (MPG) can...Ch. 2 - Tip, Tax, and Total Design a program that...Ch. 2 - Celsius to Fahrenheit Temperature Converter Design...Ch. 2 - Stock Transaction Program Last month Joe purchased...Ch. 2 - Cookie Calories A bag of cookies holds 40 cookies....Ch. 2 - Male and Female Percentages Design a program that...Ch. 2 - Ingredient Adjuster A cookie recipe calls for the...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
The variable x starts with the value 0. The variable y starts with the value 5. Add 1 to x. Add 1 to y. Add x a...
Starting Out with C++ from Control Structures to Objects (8th Edition)
Look at the following statement: mystring = 'cookiesmilkfudgecakeice cream' Write a statement that splits this ...
Starting Out with Python (3rd Edition)
Extreme programming expresses user requirements as stories, with each story written on a card. Discuss the adva...
Software Engineering (10th Edition)
This method attempts to convert a value to Integer. a. NumericConvert b. IntegerConvert c. Integer.TryParse d. ...
Starting Out With Visual Basic (8th Edition)
The two general categories of software are _____ and_____.
Starting Out with C++: Early Objects
When you define an ADT as a C++ class, what items are considered part of the interface for the ADT? What items ...
Problem Solving with C++ (10th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Fat Percentage Calculator Develop a C# application that allows the user to calculate the fat of his daily food. The user should enter: • The total number of calories for a food item • The number of fat grams in that food item Accordingly, the application will calculate and display: • The number of calories from fat • The percentage of calories that come from fat Additionally, the applications categorizes if the food is considered low fat, normal fat, or high fat as the following rule. If the calories from fat are less than 30% of the total calories of the food, the food is considered low fat. If the calories from fat are between 30% and 40% of the total calories of the food, the food is considered normal fat. If the calories from fat are more than 40% of the total calories of the food, the food is considered high fat. Note: Make sure the number of calories and fat grams are not less than 0. Also, the number of calories from fat cannot be greater than the total number of calories. If…arrow_forwardGPA Calculator Students are concerned about their GPA. They need to calculate it accurately every semester to monitor their progress. Develop a GPA calculator that follows the AOU regulations (AOU-OU Grade Scale) using C# programming language. The application asks the student to enter his numeric grade of each course and the course's credit hours. Accordingly, the application calculates the student's GPA after converting the numeric grade to letter grade. The GPA calculation should produce floating-point results. Display the results rounded to the nearest hundredth. You should store the letter grades of all student's courses in an array. The final grade of the student should be also calculated. Sample I/O Enter the course grade (-1 to end): 93 Enter the course credit hours: 3 Enter the course grade (-1 to end): 74 Enter the course credit hours: 2 Enter the course grade (-1 to end): 60 Enter the course credit hours: 3 Enter the course grade (-1 to end): -1 The grades of your courses…arrow_forwardA(n) specifies a variable’s name and data type.a. assignmentb. variable specificationc. variable certificationd. variable declarationarrow_forward
- A variable declaration specifies two things about a variable.arrow_forwardPrograming language is C# 6. Hospital Charges Create an application that calculates the total cost of a hospital stay. The daily base charge is $350. The hospital also charges for medication, surgical fees, lab fees, and physical rehab. The application should accept the following input: • The number of days spent in the hospital • The amount of medication charges • The amount of surgical charges • The amount of lab fees • The amount of physical rehabilitation charges Create and use the following value-returning methods in the application: • CalcStayCharges—Calculates and returns the base charges for the hospital stay. This is computed as $350 times the number of days in the hospital. • CalcMiscCharges—Calculates and returns the total of the medication, surgical, lab, and physical rehabilitation charges. • CalcTotalCharges—Calculates and returns the total charges.arrow_forwardPopulation Tracker Learning Objective: Using Python Repetition and Loop Statements Problem Description Write a Python program (Console and GUI) that predicts the approximate size of a population of organisms. The application should use text boxes to allow the user to enter the following information: starting number of organisms, the average daily population increase (as a percentage), and the number of days the organisms will be left to multiply. For example, assume the user enters the following values: Starting number of organisms: 2 Average daily increase: 30% Number of days to multiply: 10 The program should display the following table of dataarrow_forward
- i uploaded the screenshot please help me to do pseudocode And do flowchart should be in c++arrow_forwardT F Variable names may begin with a number.arrow_forward(Physics) Write an assignment statement to calculate the elapsed time, in minutes, it takes to make a trip. The formula for computing elapsed time is elapsed time = total distance / average speed. Assume the distance is in miles and the average speed is in miles per hour (mph).arrow_forward
- (Physics) Coulomb’s Law states that the force, F, acting between two electrically charged spheres is given by this formula: F=kq1q2r2 q1isthechargeonthefirstsphere.q2isthechargeonthesecondsphere.risthedistancebetweenthecentersofthetwospheres.kisaproportionalityconstant. Write an assignment statement to calculate the force, F.arrow_forwardC# Question Write a statement that declares a variable called even and assigns it to the value returned from calling the method IsEven with a variablearrow_forward1. Retail Price CalculatorWrite an application that accepts from the user the wholesale cost of an item and its markup percentage. (For example, if an item’s wholesale cost is $5 and its retail price is $10, then the markup is 100%.)The program should contain a function named CalculateRetail that receives the wholesale cost and markup percentage as arguments, and returns the retail price of the item. The application’s form should look something like the one shown in Figure 6-22.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY