PYTHON Programming, In 8 Hours, For Beginners! by Yao Ray

PYTHON Programming, In 8 Hours, For Beginners! by Yao Ray

Author:Yao, Ray [Yao, Ray]
Language: eng
Format: epub, pdf
Publisher: Computer Programming Language Crash Course Quickstart Guide Tutorial Book Coding Fast Project Ebook Teach Yourself In Easy Steps
Published: 2020-03-23T16:00:00+00:00


Chapter 6

Input & Output

Format String

The string output can be formatted as following chart.

Specifier

Description

d

integer

f

float

s

string

o

octal value

x

hexadecimal value

e

exponential

%

“%formatted value” from %original value

Example 6.1

num = 16. 12345678

print ("String value is: %s " %num)

print ("Float value is: %.3f " %num) # three decimal places

print ("Exponential value is: %e " %num)

print ("Octal value is: %o " %num)

print ("Hexadecimal value is: %x " %num)

print ("Integer value is: %d " %num)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Building Machine Learning Systems with Python by Richert Willi Coelho Luis Pedro(2066)
Hands-On Python Deep Learning for the Web by Anubhav Singh(1956)
Mastering OpenCV 4 with Python by Fernández Villán Alberto;(1827)
Building Serverless Python Web Services with Zappa by Abdulwahid Abdulhaque Barguzar(1711)
Mastering Python Data Visualization by Kirthi Raman(1649)
Python for Finance Cookbook by Eryk Lewinson(1638)
PYTHON PROGRAMMING ADVANCED: The Guide for Data Analysis and Data Science. Discover Machine Learning With the Optimum Recipes for Mastering Python and ... (Crash Course Tips and Tricks Book 3) by ERIC MATTHEWS & LEWIS TAYLOR(1636)
Python for Finance: Analyze Big Financial Data by Yves Hilpisch(1611)
Supervised Machine Learning with Python by Taylor Smith(1529)
Django 3 By Example by Antonio Melé(1516)
Interactive Data Visualization with Python by Anshu Kumar & Shubhangi Hora & Sharath Chandra Guntuku & Abha Belorkar(1363)
Hands-On GPU Programming with Python and CUDA by Dr. Brian Tuomanen(1286)
Python Feature Engineering Cookbook by Soledad Galli(1285)
Applied Deep Learning with Keras by Matthew Moocarme Mahla Abdolahnejad and Ritesh Bhagwat(1279)
Hands-On Image Processing with Python by Sandipan Dey(1254)
Scientific Computing with Python 3 by Claus Fuhrer & Jan Erik Solem & Olivier Verdier(1248)
Python Deep Learning. by Ivan Vasilev(1232)
Flask Framework Cookbook by Shalabh Aggarwal(1225)
Training Systems using Python Statistical Modeling by Curtis Miller(1186)
Django 3 Web Development Cookbook - Fourth Edition by Aidas Bendoraitis(1166)