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

Must watch English Travel Movies List

Here am exploring Must watch English Travel Movies List,following the list of movies you should watch before you die.

1) Eat Pray Love

Eat Pray Love is the one of the best travel movie, Elizabeth Gilbert’s embarks on a journey Through Italy , India and Bali in Indonesia an attempt to rediscover her true self.This movie is based on American author Elizabeth Gilbert book Eat Pray Love , The book remained on The New York Times Best Seller list for 187 weeks.It took three country Italy , India and Indonesia accordingly Eat ,Pray and Love.In Italy she tried and enjoyed all the food,In India she is trying to find out peach of mind through meditation,and lastly in Bali (Indonesia) she is enjoying the love.

Must watch English Movies List

2) Into the Wild

Into the Wild is a biographical adventure drama film written by Sean Penn.The script written based on the “Into the Wild” written by Jon Krakauer.McCandless hero in the movie travels into the wilderness and sets up a campsite in an abandoned city bus. At first, McCandless is content with the isolation, the beauty of nature around him, and the thrill of living off the land.

Into the Wild

3) The Beach

The Beach is a adventure film by Danny Boyle and based on Alex Garlan Novel “The Beach”.Leonardo DiCaprio play Lead role in this movie ,a young seeking adventure in Bangkok, he came to know about uninhabited and restricted island in the Gulf of Thailand with a beautiful hidden beach and lagoon.
The Beach

4) Before Sunrise

Before Sunrise is a romantic film directed by Richard Linklater, it explore the romatic love story of Jesse meets and Céline They meet on a train from Budapest.They both roam around in Vienna.After visiting a few landmarks in Vienna, they share a kiss at the top of the Wiener Riesenrad at sunset and start to feel a romantic connection.
Before Sunrise

Codeigniter No input file specified error for inside pages

If you are getting no input file specified error for inside pages in Codeigniter, this is the issue with htaccess redirection you have to replace your root htacces file with below code. if you look on the code you can see a question mark after the index.php (index.php?/$1) .This .htacces making the correct URL redirection in Codeigniter


RewriteEngine On
# Disable directory browsing 
#Options -Indexes
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]