Ad
Fundamentals
Mathematics
Tutorials
Code
Diff
  • import math
    
    def is_square(n):    
        return int(math.sqrt(n)) ** 2 == n
    • import math
    • def is_square(n):
    • return int(math.sqrt(n) + 0.5) ** 2 == n
    • def is_square(n):
    • return int(math.sqrt(n)) ** 2 == n
Tables
Data Structures
Code
Diff
  • def int_to_table(num):
        return [number for number in range(num+ 1)]
        
            
    • def int_to_table(num):
    • return list(range(0,num+1))
    • return [number for number in range(num+ 1)]