CS 022A Lecture Notes - Lecture 3: Type Conversion, Decimal Mark
31 views2 pages
14 Sep 2019
School
Department
Course
Professor
Document Summary
A value is one of the basic things aprogram wworks with. Value s belong to different data types type/class is a category of values. Float: a type that represents numbers with fractional parts/ decimal point(floating point) Str: a type that represents sequences of characters and text. The values of the string is the sequence of characters inside the quotes. The quotes are not part of the value. Sometimes it is necessary to convert values from one type to another. Python provides type conversion functions that will allow us to do that int(),float() and str() convert their arguments into types int,float and str. A variable is a name ,an abstract symbol that represents/ refers to a value. Storage location: variables are used to store values that we need the computer to remember for later use by the program. Different types of data can be stored in variables. Not permanently tied to a value - variables value can change.
Get access
Grade+
$40 USD/m
Billed monthly
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers