タイトルが悪くてすみません。これが私のコードです:
import math
# Finds the square root of a number
def square_root():
square_root = math.sqrt(int(raw_input('What number do you want the Square Root for')))
print "The square root of is: %d " % (square_root)
基本的に、ユーザーが 0、1、4、6、9、または 25 で終わらない数字を入力できないようにしたいので、完全な正方形しか出力できません。何をすべきかはある程度わかっていますが、まともなGoogle検索を行うための用語を思い出せないので、ここに来ました。
私はそれが何らかの形でif
このようなものを含むことを知ってい[1:3]
ます.