Oct-24-2018, 07:17 AM
Hi everyone,
just started learning python3 at university. We got a homework and I do not litterally know where to start.
We are asked to make a program that converts numbers from 0-999999 to words. for example: input: 587 output: fivehundredeightyseven.
And the same vica versa: input: onetohursandfivehundredseventytwo outut: 1572
I unferstand from my little experience that I will make something like: nums=["one", "two"..."thoursand"].
But I do not know how to create the algoritm for reading the input. to recognise that twohundred= "two" + "hundred". the input and output is supposed to be without spaces everytime.
I would appriciate so much if anyone helps me... Even better if someone gives me some contact and I will be able to write to the same person with some problems during programming...
Have a nice day everyone.
just started learning python3 at university. We got a homework and I do not litterally know where to start.
We are asked to make a program that converts numbers from 0-999999 to words. for example: input: 587 output: fivehundredeightyseven.
And the same vica versa: input: onetohursandfivehundredseventytwo outut: 1572
I unferstand from my little experience that I will make something like: nums=["one", "two"..."thoursand"].
But I do not know how to create the algoritm for reading the input. to recognise that twohundred= "two" + "hundred". the input and output is supposed to be without spaces everytime.
I would appriciate so much if anyone helps me... Even better if someone gives me some contact and I will be able to write to the same person with some problems during programming...
Have a nice day everyone.