+ 2
Write a Python code to read an integer in a file e.g 123 and convert it to words e.g One hundred and twenty three and write the
9 Respuestas
+ 1
# ok, I figured out a clean and short way using indexes which could be extended to meet your requirements, check this out
l = ["zero","one","two","three","four","five","six","seven","eight","nine","ten"]
# add as much as you need written mumbers in the list
for num in range(len(l)):
print(f"{num}: {l[num]}")
# output
0: zero
1: one
2: two
3: three
4: four
5: five
6: six
7: seven
8: eight
9: nine
10: ten
+ 1
Only logic is important.Nothing else doesn't matter whatever language python or java.
I am also comfortable in java.
0
Help me please
0
Hi! You start write a Python code?
0
Thanks everyone this helps me lot
0
🅰🅹 (Challenge Accepted) you are posting Java and JS code which is out of the scope while the dude asked for python and you complained me for requirements 🤣🤣🤣🤣🤣 my code is the core logic, I assume the dude knows how to CRUD a file in python. if your answer was on stackoverflow you should been received +100 downvotes and a freeze!
0
iTech
Doesn't matter on language. Every languages have same logic only syntax change.
I gave him 2 example to know how to do that.
If you don't understand then don't give unnecessary answer.
0
Vinay your question tag is python3 nor java neither js. every detail count! answer must be relevant to the question. its true this is not stackoverflow but come on, at least a minimum of compliance is required.
0
I know it's not relevant .But I understand java .So, it's ok to me.thanks a lot for helping me 🙏