0

def main(): n = eval(input("How many numbers do you have? ")) sum = 0.0 for i in range(n): x = eval(input("Enter a number

What happen to this code, not running

22nd Jan 2022, 6:42 AM
Umar Nurudeen Ojo
Umar Nurudeen Ojo - avatar
2 Réponses
+ 2
why would you use eval() for input like that? just explicitly make it a float or an int. And the code was cut off
22nd Jan 2022, 6:55 AM
Slick
Slick - avatar
22nd Jan 2022, 8:28 AM
Jayakrishna 🇮🇳