# 2.4 Scr0140: arithmetic operators  (Page 5/7)

 Page 5 / 7

## Constructing the script

That seems straightforward enough. However, the process of constructing that script contains some new material, so I will walk you through the process.

Image 3 shows the state of the development process immediately after the blocks for the variables named Sum and Diff have been dragged from the Variables panel to the center panel and connected to the block that reads when button clicked .

## Not exactly what we want to happen

In Image 3 , as it stands now, the variables named Sum and Diff will be set to a value of zero when the user clicks the button. That isn'twhat we want, so we have some more programming to do.

The desired behavior is for the value of the variable named Sum to be set to the sum of the variables named LeftOperand and RightOperand when the user clicks the button. Similarly, we want the value of thevariable named Diff to be set to the difference between those two variables.

## The Operators panel

The left panel in Image 3 shows the blocks that are exposed when the green button labeled Operators is clicked.

Eleven of those blocks are of the correct shape to fit into the white boxes in the two bottom orange blocks inthe center panel. This means that we could drag any one of those eleven blocks and drop them into those white boxes.

## Four arithmetic operators

The top four green blocks in the left panel of Image 3 are particularly interesting. They contain the following arithmetic symbols as part of their labels:

• +
• -
• *
• /

These are the symbols that are commonly used for addition, subtraction, multiplication, and division in computer programming. The top two matchwhat you are accustomed to seeing on your hand calculator, but the bottom two probably don't match.

## Use an asterisk for multiplication

Most programming languages use the * character instead of the X character for multiplication in order to keep the multiplication operator frombeing confused with the letter that uses the X symbol.

## Use a forward slash for division

Insofar as division is concerned, most computer keyboards don't have a symbol that matches the symbol commonly used for division on hand calculators, so the /character is used instead.

## More blocks of the correct shape

Before leaving the discussion of the left panel in Image 3 , I will explain the behavior of four additional blocks that are of the correct shape forbeing dropped into the white boxes in the variable blocks in the center panel. (The remaining blocks beyond those four deal with strings, which I will ignore for now.)

## Random numbers

The block labeled pick random 1 to 10 lets you enter other values in place of 1 and 10. Then this block will deliver a random number withinthat range when it is called upon to do so. Random numbers are often used in game programs to simulate the throwing of dice or the spinning of a wheel offortune.

## The modulus

The block labeled mod will produce the modulus of two values when called upon to do so. The modulus of two numbers is the remainder thatresults from dividing one number by another number. You may remember the remainder from when you learned to do long division in elementary school butbefore you learned about decimals.

are nano particles real
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
no can't
Lohitha
where we get a research paper on Nano chemistry....?
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!