Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function to convert
#5
Yes, I did mistype the semicolon, The instruction is to write a function which asks for a single parameter, in my case a number and it will return a string( for number 1="one") it should handle numbers from 1-10.
After that, i have to use this function in another function what I have made already

def count(numOne, numTwo):
for i in range (numOne,numTwo+1):
print i


print count(2,8)

and the results should be instead of 2,3,4,5,6,7,8, one two three...
Reply


Messages In This Thread
Function to convert - by slehee - Oct-22-2017, 07:59 PM
RE: Function to convert - by metulburr - Oct-22-2017, 08:13 PM
RE: Function to convert - by slehee - Oct-22-2017, 08:20 PM
RE: Function to convert - by sparkz_alot - Oct-22-2017, 08:38 PM
RE: Function to convert - by slehee - Oct-22-2017, 08:44 PM
RE: Function to convert - by sparkz_alot - Oct-22-2017, 08:52 PM
RE: Function to convert - by slehee - Oct-22-2017, 08:57 PM
RE: Function to convert - by sparkz_alot - Oct-22-2017, 09:04 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020