Question

Python programming

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Exercise 89: Convert an Integer to Its Ordinal Number

Words like first, second and third are referred to as ordinal numbers. In this exercise,
you will write a function that takes an integer as its only parameter and returns a
string containing the appropriate English ordinal number as its only result. Your
function must handle the integers between 1 and 12 (inclusive). It should return an
empty string if the function is called with an argument outside of this range. Include
a main program that demonstrates your function by displaying each integer from 1
to 12 and its ordinal number. Your main program should only run when your file has
not been imported into another program.


source: The Python Workbook Ben Stephenson A Brief Introduction with Exercises and Solutions Second Edition
answered by: Năng Hiệp Hồ
Add a comment
Know the answer?
Add Answer to:
Python programming
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT