[Tutor] Help
Peter Otten
__peter__ at web.de
Thu Sep 7 14:35:49 EDT 2017
edmundo pierre via Tutor wrote:
>
> I am trying to write a code that asks an User to Enter a decimal number,
> the my program should separate the number in two parts like this: 1
> cae:Enter a number: 12.9Decimal part: 12whole part : 9 2 case:Enter:
> 10Decimal par:Whole part: 10 That is my code:
> A = input("Enter a number")
> C = [ ] for i in str(A) :
> C.append(i) if i ==".# period ": break aa= "".join(c)
> print(aa, end =" ") if i == int(A): print(" It is the whole part")
> I can not display the whole part when I enter float number. Plus when I
> enter an integer, it takes that enteger as a decimal number. Any help?
Hello Edmundo!
We are all volunteers. Please help us help you. If you have a look at
https://mail.python.org/pipermail/tutor/2017-September/111984.html
you can see what we see of your code. It's completely garbled, and second-
guessing what it might originally have looked like is no fun.
You have to find out how to get your email program to send unmodified plain
text before we can engage in a meaningful conversation.
Thank you.
More information about the Tutor
mailing list