Programming With Generative AI

Watch and track your favorite playlist.

Curated by: NPTEL - Indian Institute of Science, Bengaluru (220 videos)


Currently Playing: Lec 187 Python: Example 2

walrus operator, assignment expression, falsy, truthy PythonTutor (buggy code): https://pythontutor.com/render.html#code=def%20inverse%28n%3A%20int%29%20-%3E%20float%3A%0A%20%20%20%20if%20n%20%3D%200%3A%0A%20%20%20%20%20%20%20%20return%20float%28'inf'%29%0A%20%20%20%20return%201%20/%20n%0A%0Aif%20__name__%20%3D%3D%20'__main__'%3A%0A%20%20%20%20n%20%3D%201001%0A%20%20%20%20print%28f'inverse%28%7Bn%7D%29%20%3D%20%7Binverse%28n%29%7D'%29&cumulative=false&heapPrimitives=true&mode=edit&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false


Tracks in this Playlist