CS 1110 Lecture Notes - Lecture 1: Scientific Notation

44 views1 pages

Document Summary

Complex expressions --> an expression with four literals and some operators. Ex: (3*7+2)*9 would yield a different value than what we"ve entered as the input. Type = a set of values and operations on them. The meaning of these operations depends on the type. Int -- can be either positive or negative and will never have a decimal in them. float -- a number which includes a decimal. +, -, * (multiply), / (divide), ** (to the power of), unary - (making something a negative value). If i use only ints as inputs to an expression, i will always get an int in return. If an expression of ints would result in a decimal, the result would be rounded down to the nearest whole number. For instance 17 % 5 would yield 2. Floats can be expressed in scientific notation, decimals or exponential forms. Float answers may not always be reliable given base 2 inconsistencies.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents