Customer Service Chat
Get quote & make Payment
Data Type Conversion, Basic Computer Science
Sometimes you may drop to perform conversions among the built-in types. To translate between types you just use the type name as a function.
There are quite a few built-in functions to carry out conversion from one data type to another. These functions return a new object representing the changed value.
Converts x to an integer. Base states the base if x is a string.
long(x [,base] ) Converts x to a long integer. Base identifies the base if x is a string.
float(x) Changes x to a floating-point number.
complex(real [,imag]) Generates a complex number.
str(x) Changes object x to a string representation.
repr(x) Changes object x to an expression string.
eval(str) Estimates a string and returns an object.
tuple(s) Changes s to a tuple.
list(s) Changes to a list.
set(s) Translates s to a set.
dict(d) Generates a dictionary. d must be a sequence of (key, value) tuples.
frozenset(s) Translates s to a frozen set.
chr(x) Translates an integer to a character.
unichr(x) Translates an integer to a Unicode character.
ord(x) Translates a single character to its integer value.
hex(x) Translates an integer to a hexadecimal string.
oct(x) Translates an integer to an octal string.
Posted Date: 5/5/2012 3:59:55 AM | Location : United States
Ask an Expert
Data Type Conversion, Assignment Help, Ask Question on Data Type Conversion, Get Answer, Expert's Help, Data Type Conversion Discussions
Write discussion on Data Type Conversion
Your posts are moderated
Write your message here..
D, #questionWrite a program to find the area under the curve y = f(x) betwe...
#questionWrite a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two poi
Write a long note on computer languages, Question 1 Explain the importan...
Question 1 Explain the importance of graphics in multimedia. What are few of the tips to keep in mind while using graphics for the web? Question 2 Write a long note on co
Ipx for lan, explain ipx for lan and spx
explain ipx for lan and spx
Basic computer structure, Basic computer structure: A computer is an el...
Basic computer structure: A computer is an electronic device, which can accept and process data by carrying out a set of stored instructions in sequence. This sequence of math
Editor and assembler, Editor and Assembler: To write a program in...
Editor and Assembler: To write a program in any of the programming languages requires an editor. This is a program that is used to create text files. While saving the p
Determine recursive c function computes, QUESTION (a) Give the two cond...
QUESTION (a) Give the two conditions required by a binary tree of depth d to be an almost complete binary tree. (b) Determine what the following recursive C function compute
Python Numbers, Number data types store numeric values. They are an immutab...
Number data types store numeric values. They are an immutable data type, which means that changing the value of a number data type results in a newly allocated object. Number objec
Algorithm, solve three given number in ascending order through algorithm
solve three given number in ascending order through algorithm
About the faculty posts, is there any oppurtunity for a mca to teach mcasub...
is there any oppurtunity for a mca to teach mcasubjects online
Infix expression, ab+cd-/
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Follow Us |
T & C
Copyright by ExpertsMind IT Educational Pvt. Ltd.