Introduction To Programming
4
1.50
-14
1000000
5e10
prompt dialog, what data type comes into your program?
Number() function.
Number() function takes the current value of the string in the variable, "4.99", and converts it to a number if it can. Then our line of code puts the new number back into the price variable.
Note: Since I typed the numbers into the program, I don't need to convert them to a number. They are already a number!
(+)
+ (plus) symbol for addition.
(-)
- (dash) symbol for subtraction.
(*)
* (asterisk) symbol for multiplication.
(/)
/ (forward slash) symbol for division