You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using type conversion operators such as int() or str() is not taken into account when assigning type information to variables. For eg
import math
def main():
a = int(input())
b = int(input())
bstr = str(b)
num = a * 10 ** len(bstr) + b
for i in range(1, 100100):
if i * i == num:
break
if i > 100100:
print("No")
else:
print("Yes")
main()
In this type infered for variable a and b should be int and for bstr it should be string but type inference module shows 'Any'
The text was updated successfully, but these errors were encountered:
shashank-g12
changed the title
type inference using type coversion
type inference using type conversion
Jan 1, 2024
Using type conversion operators such as int() or str() is not taken into account when assigning type information to variables. For eg
In this type infered for variable a and b should be int and for bstr it should be string but type inference module shows 'Any'
The text was updated successfully, but these errors were encountered: