Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is a python 2 question def int to word (i): word = # Fill your code here, use as many new lines you

this is a python 2 questionimage text in transcribed

def int to word (i): word = "" # Fill your code here, use as many new lines you like. Delete this line. # you will get a zero if this method doesn't return a string ####################### return word print "Enter an integer from 1 to 99:" S = raw_input(). try: a = int(s) if a 99: print("This method only works for integers from 1 to 99") else: print("The given number in words:") print (word) except: print ("Method only works for integers") Expected outcome: >> Python 96.py Enter an integer from 1 to 99: >> 10 "The given number in words: Ten >> python 96.py Enter an integer from 1 to 99: >> 101 This method only works for integers from 1 to 99 >> python 96.py Enter an integer from 1 to 99: >> yaw Method only works for integers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions