Question about Microsoft Computers & Internet

1 Answer

Can you initilise the value of a constant with the value of a variable

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that gotĀ 5 achievements.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

    Scholar:

    An expert who has written 20 answers of more than 400 characters.

  • Expert
  • 84 Answers

Whether or not you can do it depends on the programming language. In terms of best practice, it's usually frowned upon to initialize a constant using a variable.
The reason for this is that if it your value is truly a constant (e.g. pi) you'd know the value beforehand and would be able to hardcode it. Initializing a constant using a variable, implies that it's not constant and thus should be declared as a variable and not as a constant.

Posted on Mar 28, 2011

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

2 Answers

What is an dependent variable


All values that arise as influenced by changes in the values of other variable. Or, Dependent Variable is the observed factor.
If we have a Linear Function as
Y = mX + C
so,
Y should be Dependent Variable,
X as Independent Variable,
m as Coefficient and
C as Constant.

Aug 30, 2016 | Office Equipment & Supplies

1 Answer

What is an independent variable


A quantity that can vary independently on any other quantity in the situation being studied. When a independent variable changes it value, the value of the dependent variable changes in accordance with the rule that links the two variables. As a worker, you can decide of your own free will to work 10 hours or 40 hours per week (the number of hours worked is the independent variable). Depending on the course of action you choose (10 or 40, or 0 hours), your weekly salary will vary according to the pay-formula.
weekly salary =(number of hours worked in the week)* (hourly rate)+ some constant.

Sep 26, 2014 | Office Equipment & Supplies

1 Answer

How to write this problem in code


const feet_per_mile = 5280
distance = 8.5
print "the distance is "+distance "+miles or+" distance*feet_per_mile+" feet."

Jul 14, 2014 | Computers & Internet

1 Answer

Program that will compute the volume of a cone


Volume of right circular cone is (1/3)*PI*(r^2)*H
Define real variables r, h
Define constant PI or use built in name.
Prompt for input r=?
Read value and store in r
Prompt for height H=?
Read value and store in H.
Print Volume =, (1/3)PI*r^2*H, unit^3

Dec 27, 2013 | Computers & Internet

1 Answer

A program that will compute the volume of a cone


Volume of right circular cone is (1/3)*PI*(r^2)*H
Define real variables r, h
Define constant PI or use built in name.
Prompt for input r=?
Read value and store in r
Prompt for height H=?
Read value and store in H.
Print Volume =, (1/3)PI*r^2*H, unit^3

Dec 27, 2013 | Computers & Internet

1 Answer

Matrix entering and constants


Sorry to be the bearer of bad news, but the HP 10S calculator does not perform matrix calculations.
You have 9 variables A to F, M, X and Y. You can use them to store data, constants, calculation results, and other numerical values.
To store say the value 5674 in Variable A you press the key sequence 5 6 7 4 [SHIFT] [STO] A.
To recall the value stored in A (and use it in another calculation) you press [ALPHA] [A]. It will be displayed and you can do with it any calculation you want.
You can enter (store) data in Statistics modes
  • Mode 2 is for standard deviation SD (1-variable statistics)
  • Mode 3 is for Regressions.
You will have to read the manual starting from page 23.

Sep 23, 2013 | HP 10s Scientific Calculator

1 Answer

Need help with rate of change and direct variation


No need for a claculator to understand these concepts.
A linear function is a function of the form y=ax+b. It contains an independent variable,x, a dependent variable, y, and two constants, a and b,
The value of the constant a is the measure of the rate of change of the function, The value of the constant b is the ordinate (value along the y-axis) where the straight line cuts the y-axis. It is called the y-intercept, or the initial value.
If the value of b=0, the straight line passes through the origin O(0,0). The purists call this type of variation, a direct variation. If b is not equal to 0, it is called a partial variation or some other name.

If you have the graph drawn, b is read off the y-axis: You look at the graph and try to estimate the ordinate of the point where the line cuts (intersects) the y-axis.
To get the rate of change a, you select two points on the line. Let 1st point have coordinates (x1,y1) and the 2nd point have coordinates (x2,y2).
The rate of change is given by the ratio (y2-y1)/(x2-x1). You can also use a= (y1-y2)/(x1-x2). Respect the order in the two expression or you will get the negative value of the rate of change.

May 10, 2011 | Texas Instruments TI-83 Plus Calculator

1 Answer

How do you enter your variable?


The memory locations A,B,C,D,X,Y and M are available to store values in them. M is the constant memory.
To type the name of, say, variable X, you press the ALPHA key then the the key next to which is the X in cyan/Green color. If I remember correctly it is the key marked with a parenthesis ).

However to store a value in a memory location or to recall a stored value you use the STO key to store and the RCL key to recall. To store or recall there is no need to press the ALPHA key.

Jun 14, 2010 | Casio fx-300ES Calculator

1 Answer

How do enter a lim of function when from one side using nderiv


Hello,
nDeriv( is valid only for real variables.
The syntax is as follows:
nDeriv ( expression, variable, value, epsilon)

expression: the function the derivative of which you want to calculate
variable: the name of the variable in the expression above (usually x)
value: the numerical value of the e x where you evaluate the derivative
epsilon: the numerical value of the tolerance. Default is 1x10^(-3). But you can change it to a smaller value to obtain a more precise result.

To use default value of epsilon
nDeriv ( expression, variable, value)

To use a different epsilon, ex 1x10^(-4)
nDeriv ( expression, variable, value, 0.0001)

nDeriv( A^3 , A, 5., 0.0001) should give you 75

Hope it helps.

Oct 21, 2009 | Texas Instruments TI-84 Plus Calculator

2 Answers

Constants/missing correlations in SPSS


If all values for a specific "dummy" variable are identical, then you should delete the variable, because it adds NO information to your analysis.

If all values for one "dummy" variable MATCH the values for another "dummy" variable, then the two variables are 100% correlated -- remove one of them from your analysis.

Apr 06, 2009 | SPSS 13.0 (30960UU)

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

203 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2727 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18392 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...