Write an if-then statement for the following code

Assignment Help Programming Languages
Reference no: EM13952905

Instructions: Define the following:

1. Procedural Programming

2. Pseudocode

3. Assignment Statement

4. Rules of Precedence

5. Relational Operators

6. Compound Condition

7. Loop Control Variable

8. Sentinel Value

9. Array

10. Binary Search

Instructions: List the best possible term for each question.

1. When using a flowchart, input is represented by what geometric shape?

2. The rules that govern a programming language are called ____.

3. The instruction Myanswer = Mynumber*2 is an example of a(n) ____ operation.

4. In the following statement, which arithmetic operation is performed first?

answer = a + b +c * d / e - f

5. What is an equivalent way to write the following statement?

answer = a + b + c * d / e - f

6. What operator has the lowest precedence?

7. The structure which takes one of two paths based on a decision is called a(n) ____ structure.

8. When you need to ask multiple questions before an outcome is determined, you must create a ____.

9. Which takes precedence when the two are combined in a single statement: AND or OR?

10. A(n) ____ is any numeric variable you use to count the number of times an event has occurred.

11. When the value of a loop control variable is not altered by arithmetic, but instead is altered by user input, this is known as a(n) ____ loop.

12. At the beginning of any method, it is the programmer's responsibility to ____ all variables that must start with a specific value.

13. A ____, also called an index, is a number that indicates the position of a particular item within an array.

14. When you declare an array, you provide a(n) ____ name for a number of associated variables in memory.

15. Every array has a(n) ____ size.

Instructions: Answer the following coding questions. You do not have to write full programs or declare variables. Only write the snippet of code. Do not write pseudocode.

Question 1:

What is the answer for the following operations: a. (2+4) * 8 - 3 /10

b. 20 /2 - 3 * 5 + (4-3)

Question 2:

Write an IF-THEN statement for the following:

Display a message to user stating it is cold outside if the temperature is between 30 degrees and 55 degrees; otherwise,

display a message to the user that the weather is nice out today.

Question 3:

Write a FOR loop that adds the numbers from 1 to 10 and displays the result.

Question 4:

Write a WHILE loop that squares each number starting with 1 and ends when the square equals 49.

Question 5:

Write an array that stores the square of the numbers from 1 to 5 in each element. Write out each element. You must

use a looping structure for this program.

Reference no: EM13952905

Questions Cloud

Find probabilities associated with the area above : The areas under a standard normal curve also may be considered to be proba- bilities. Find probabilities associated with the area:- Above Z = 2.33 and Below Z = -2.58
Determine the areas under the standard normal curve : Determine the areas under the standard normal curve that fall between the following values of Z: a. 0 and 1.00b. 0 and 1.28 c. 0 and -1.65
Describe the social responsibility-sustainability : Describe the social responsibility and/or sustainability (environmental, social or economic- also known as the triple bottom line) issues that apply and the stakeholders to whom these issues apply.
What are three important properties of a normal distribution : The following questions pertain to some important facts to know about a normal distribution: What are three important properties of a normal distribution?
Write an if-then statement for the following code : Write an array that stores the square of the numbers from 1 to 5 in each element. Write out each element.
Quoting, paraphrasing, and summarizing : What is the difference between quoting, paraphrasing, and summarizing? What type of citation is required for each? Why is properly citing sources important?
Determine the probability density function : Define the probability density and cumulative probability function for an absolutely continuous random variable. Which of these functions is analogous to the probability mass function of a discrete random variable?
Jesse to calculate profit for sales of backpacks : Create a spreadsheet model for Jesse to calculate profit for sales of the backpacks (one model.) Demand and production quantity for each of the three models are uncertain variables.
Describe why the fraud was committed and amount of loss : write a report on the article, including if described in the article items to report on: perpetrator info, why the fraud was committed (motive), amount of loss (damages).

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd