[Tutor] Creating a Loop

Kaysi Matos ke.akers.matos at icloud.com
Thu Sep 23 21:38:07 EDT 2021


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()


More information about the Tutor mailing list