How to convert a integer value to word in python

To convert a integer value to word in python our aim is to convert 124 to “One Hundred Twenty Four”

Here is python code to convert integer value to word

def Towords(num):
	under_20 = ['Zero','One','Two','Three','Four','Five','Six','Seven','Eight','Nine','Ten','Eleven','Twelve','Thirteen','Fourteen','Fifteen','Sixteen','Seventeen','Eighteen','Nineteen']
	tens = ['Twenty','Thirty','Forty','Fifty','Sixty','Seventy','Eighty','Ninety']
	above_100 = {100: 'Hundred',1000:'Thousand', 1000000:'Million', 1000000000:'Billion'}
	if num < 20:
		 return under_20[num]

	if num < 100:
		return tens[(int)(num/10)-2] + ('' if num%10==0 else ' ' + under_20[num%10])
	# find the appropriate pivot - 'Million' in 3,603,550, or 'Thousand' in 603,550
	pivot = max([key for key in above_100.keys() if key <= num])
	return Towords((int)(num/pivot)) + ' ' + above_100[pivot] + ('' if num%pivot==0 else ' ' + Towords(num%pivot))


print(Towords(124))

Output

One Hundred Twenty Four

How to convert a integer value to word in python

tiger view in 3d not working in my phone

tiger view in 3d not working my phone

View in 3d is a new feature in smart devices it allow you to view the animal in 3D format.But it is visible only in google core compatible mobile phone.Here is the list of mobile phone that will work view in 3d options

Asus Zenfone AR
Asus Zenfone ARES
Google Nexus 5X
Google Nexus 6P
Google Pixel, Pixel XL
Google Pixel 2, Pixel 2 XL
Google Pixel 3, Pixel 3 XL
Nokia 6 (2018)
Nokia 6.1 Plus
Nokia 7 Plus
Nokia 8
Nokia 7.1
Nokia 8 Sirocco
Honor 8X
Honor View 10 Lite
Honor 10
Honor V20
Nova 3, Nova 3i
Huawei Mate 20 Lite
Huawei Mate 20 Pro
Huawei Mate 20 X
Nova 4
Huawei y9 (2019)
Huawei P20, P20 Pro
Huawei Mate RS Porsche Design
LG G6
LG G7 One
LG G7 ThinQ
LG V30, V30+, V30+ JOJO
LG V35 ThinQ
LG Q6
LG V40
LG Q8
Moto G5S Plus
Moto G6
Moto Z2 Force
Moto Z3
Moto Z3 Play
Moto Z2 Force
Moto X4
Moto One
Moto One Power
OnePlus 3T
OnePlus 5
OnePlus 6
OnePlus 6T
Samsung Galaxy A5 (2017)
Samsung Galaxy A7 (2017)
Samsung Galaxy A8, Samsung Galaxy A8+ (2018)
Samsung Galaxy Note 8
Samsung Galaxy S7, Galaxy S7 Edge
Samsung Galaxy S8, Galaxy S8+
Samsung Galaxy S9, Galaxy S9+
Galaxy Tab S3
Galaxy Tab S4
Xiaomi Mi Mix 2S
Xiaomi Mi 8
Xiaomi Mi 8 SE
Mi Mix 3
Pocofone F1
Vivo Nex S
Vivo Nex dual display
Sony Xperia XZ Premium
Xperia XZ1, Xperia XZ1 Compact
Xperia XZ2, Xperia XZ2 Compact, Xperia XZ2 Premium
Xperia XZ3


Here is the list of animals that can view in 3d

Lion
Tiger
Cheetah
Shark
Hedgehog
Duck
Emperor penguin
Wolf
Angler fish
Goat
Rottweiler
Snakes
Eagle
Brown bear
Alligator
Horse
Shetland pony
Macaw
Pug
Turtle
Cat
Octopus
Dog
Golden Retriever