Computer Science, asked by murmurajendra636, 1 month ago

Explain the two types of constants and variables used in BASIC. Give making.​

Answers

Answered by npdeepthi12
2

Explanation:

What are some examples of constants and variables?

When trading, they say the herd is normally wrong, but surely if you do what the herds are doing, then that is where the money is. If everyone is selling, is the price going to drop?

When “they say” meaning a guru or a professional of the market who works for a financial company says that the “herd” is wrong he

Steven Smith

Answered 3 years ago

A constant is something that cannot change without breaking mathematics and science. Aka precisely one fixed value.

That could be numbers, such as 42, 69, 5123521, -421, etc… which can only have 1 value.

That could be rational numbers like 432/512 or 45431/54663 or 4/39, etc… which again can only have 1 value.

That could even be irrational numbers like 2–√

Some of the more famous constants are these:

π which has many definitions, one of which is the ratio of the circumference of a circle to the diameter.

e which again has many definitions, one of which is the amount of money you would have in one year if you invested one unit for 1 year at 100% interest compounded continuously.

The gravitational constant G used in physics.

The speed of light c most famous from Einstein’s equation E=mc2

The principal square root of negative one, aka i or j where i is inconvenient (such as in electrical engineering).

Avogadro’s number NA used commonly in chemistry.

This is far from a complete list.

Next I will tackle the more difficult one, examples of variables.

First I think it is good to give a very simplistic definition of variable. Variable is written and pronounced very similar to the words vary able. This makes perfect sense, if a value is vary able, then that value is able to be varied. Varied means modified or altered. So a value that is variable can be thought of a value that can be modified or altered, aka changed.

Some letters commonly used to represent variables are x, y, z, and t. However, depending on the application, that list could be expanded to other letters such as a, b, and c, or whatever letter the person finds most appropriate.

There are many different types of variables, I will mention just a few.

Dependent variables are variables that change as a result of something else changing. In basic algebra, y is commonly used as the dependent variable.

For example, if you had a function y=2x−1, you know the value of y will change anytime you change the value of x. When x=0, y becomes -1. When x=20, y becomes 39, etc…

The variable x I used in the previous example would be considered the independent variable in that case, the independent variable is the one that changes the other variable(s).

Another type of variable that is used in probability is called a random variable. A random variable is used to represent something that has a degree of chance involved.

For example, if you had a fair dice where all 6 numbers were equally likely, and you wanted to know the probability that you got your first 6 on the 3rd roll, you could set up a random variable like this:

X: The number of rolls until the first 6.

Then you can use that random variable with probability formulas, in this case it would be what is called a geometric random variable.

P(X=3)=16(56)2

P(X=3)=25216

The X represents something random, the number of rolls until the first 6, this is something that is purely based on chance, it can take many different values.

Another way variables are used sometimes is to represent the unknown. For example, if you want to know what number plus 2 equals 5, you can replace the unknown number with a variable. x+2=5. In this case, the variable is effectively a constant, because it is 3. When using a variable in this way, it is usually because you do not know the value, and thus if you were to guess the value, there are many values you could guess from. After you solve it, the guesswork is gone and you know exactly what it is, but before solving, as far as you know it could be many different values.

Those are some of the best examples of variables I could think of off the top of my head, hopefully this is of some help.

I am a software engineer looking to find a remote job with a company in the USA. What is some advice for me?

Vijay Krishnan

Updated February 14

tl;dr: You should try Turing.com. I am Vijay Krishnan, Founder & CTO of Turing.com, based in Palo Alto, California, right in the heart of the Silicon Valley. We match exceptional software engineers from around the world to top U.S. and Silicon Valley companies that are hiring for full-time

What are some good examples of constant variables in science?

35,031 Views

What is a constant variable and what are some examples?

2,954 Views

What are constant variables?

151 Views

What are some examples of a constant?

682 Views

What are some examples of types of constants?

398 Views

What are variables and constants?

1,628 Views

What is the difference between a constant and a variable? What are examples of each?

361 Views

What are variables and what are the examples of variables?

318 Views

Similar questions