Programming With Generative AI

Watch and track your favorite playlist.

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


Currently Playing: Lec 161 Visualizing num_unique

break PythonTutor: https://pythontutor.com/render.html#code=def%20num_unique%28data%3A%20list%29%20-%3E%20int%3A%0A%20%20%20%20count%20%3D%200%0A%20%20%20%20for%20i%20in%20range%28len%28data%29%29%3A%0A%20%20%20%20%20%20%20%20for%20j%20in%20range%28i%20%2B%201,%20len%28data%29%29%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20data%5Bi%5D%20%3D%3D%20data%5Bj%5D%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20count%20%2B%3D%201%0A%20%20%20%20return%20count%0A%0Aprint%28num_unique%28%5B%5B1%5D,%20%5B1%5D,%20'3'%5D%29%29&cumulative=false&curInstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=311&rawInputLstJSON=%5B%5D&textReferences=false


Tracks in this Playlist