ENGINEER 1D04 Chapter 3: chapter 3

37 views2 pages
scarletotter976 and 37168 others unlocked
ENGINEER 1D04 Full Course Notes
4
ENGINEER 1D04 Full Course Notes
Verified Note
4 documents

Document Summary

Data: information that is stored and manipulated by computer program. Whole numbers are represented using the integer data type (int ), the values could be positive or negative. Numbers that can have a fractional parts are represented as a floating (float) Any long integer is represented as l as its last digit. Type function: tells us the data type of any value. The float type stores only approximations to real numbers, while (int) always have exact value. A library: is just a module that contains some useful definitions. To tell python that we are using the math module(library) the following line needs to be written at the top of the program import math. The general form when using a function from the math library. Four useful built- in functions(explicitly convert one data type into another: float () which converts the number to a float, ex. Float(1)=1. 0: round() which rounds a float to a nearest whole number , ex.

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