CS 022A Lecture Notes - Lecture 3: Type Conversion, Decimal Mark

12 views2 pages

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+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

Related Questions