Login
|
Create Account
+1-415-670-9189
info@expertsmind.com
Submit Homework/Assignment
Get quote & make Payment
Get Solution
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.
Function Description
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
Related Discussions:-
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..
Related Questions
Artificial intelligence-internal structure of agents, Internal Structure of...
Internal Structure of Agents We have looked at agents in conditions of their outside influences and behaviors: they take effort from the atmosphere and do lucid actions to chan
Define Shortest-Job-First (SJF) Scheduling ?, • It is also known as Shortes...
• It is also known as Shortest-Process-Next (SPN). • Shortest-Job-First (SJF) is a non-preemptive order in which waiting job (or process) with the smallest predictable run-time-to-
Transfer instructions, They are utilized to move the contents of the operat...
They are utilized to move the contents of the operators. Each instruction can be used with many different modes of addressing. MOV MOVS (MOVSB) (MOVSW) MOV INSTRUCTION Principle: D
Graphical bulleted slides, Here are the more specific requirements and the ...
Here are the more specific requirements and the related points - use the below as a check-off list when you make your presentation. Please note . . . many of the requirements are
Ida* search-artificial intelligence, IDA* Search-Artificial intelligence: ...
IDA* Search-Artificial intelligence: A* search is a sophisticated and successful search strategy. yet, a problem with A* search is that it might keep every states in its memor
Time sharing system , Time Sharing System: With the use multiprogrammi...
Time Sharing System: With the use multiprogramming, the batch processing can be quite efficient. However, for many jobs, it is desirable to provide a mode in which the user i
Hill climbing - artificial intelligence , Hill Climbing - artificial intell...
Hill Climbing - artificial intelligence: As we've seen, in some particular problems, searching the search path from primly to goal state is the point of the exercise. In anothe
Instruction pipeline, How branching takes place in Instruction pipeline. Ex...
How branching takes place in Instruction pipeline. Explain with suitable examples.
Discuss the usage and benefits of storyboarding, Question 1 Discuss the us...
Question 1 Discuss the usage and benefits of storyboarding Question 2 Explain the different stages of scriptwriting Question 3 Explain the 12 fundamental principle
Language of digital computers, Language of Digital Computers: Digital ...
Language of Digital Computers: Digital computers are electronic devices which operate on two valued logic (On and OFF). The ability of a transistor to act as a switch is the k
Assignment Help
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
IT Courses and Help
ExpertsMind Services
Online Tutoring
Projects Assistance
Exam Preparation
Coursework Help
Programming Courses
Engineering Courses
Why Us ?
~Experienced Tutors
~24x7 hrs Support
~Plagiarism Free
~Quality of Work
~Time on Delivery
~Privacy of Work