[Tutor] Creating a Loop
dn
PyTutor at DancesWithMice.info
Sat Sep 25 05:17:15 EDT 2021
On 24/09/2021 13.38, Kaysi Matos via Tutor wrote:
> I wrote this program to calculate the square root. I am needing to add a loop to be able to enter multiple integers.
> This is what I have so far.
> def main():
> print("This program calculates the square root.")
> digit = int(input("Enter an integer number: "))
> square = digit*digit
> print(f"Square of {digit} is {square}")
>
> main()
Which type of loop would be best?
--
Regards,
=dn
More information about the Tutor
mailing list