Posts: 1,298
Threads: 38
Joined: Sep 2016
First, why do you need to print the "."? Second, what is the purpose of "p"?
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Posts: 1,298
Threads: 38
Joined: Sep 2016
I don't read that as a requirement to print the ".", if you feel you should, modify your 'print' statement. As to the 'p', where are you modifying its value, as you have it now, 'p' will always equal 0.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Posts: 1,298
Threads: 38
Joined: Sep 2016
Just as you have a counter for 'contador', you also need to add to 'p' the values entered for 'a'.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition