0

when i try to run a code it does not show any error instead the only testcase is hidden!!! what should i do?

in python data structure course i'm writing a code of tuple unpacking but it shows the test case is hidden so i cannot go forward in that course!! please help!

10th Feb 2023, 8:48 AM
Akash Kumar
Akash Kumar - avatar
5 Réponses
+ 3
Show your code. Mention the task number.
10th Feb 2023, 9:08 AM
Lisa
Lisa - avatar
+ 3
Akash Kumar Python Data Structures Module 17.2 Mapping Software This is the challenge details, now show us your attempt so we may guide you to an understanding of the requirements
10th Feb 2023, 9:43 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
Akash Kumar I believe you have not applied the correct mathematical formula. Try this instead dist[d]= math.sqrt((x**2) + (y**2))
11th Feb 2023, 1:10 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
i don't know how to interact with someone on this site topic:- Tuple unpacking code:- import math points = [ (12, 55), (880, 123), (64, 64), (190, 1024), (77, 33), (42, 11), (0, 90) ] dist=list(range(len(points))) d=0 for (x,y) in points: dist[d]= math.sqrt(x**2) + math.sqrt(y**2) d+=1 print(min(dist))
11th Feb 2023, 12:58 PM
Akash Kumar
Akash Kumar - avatar
+ 1
thank you Rik wittkopp!! done!
11th Feb 2023, 1:21 PM
Akash Kumar
Akash Kumar - avatar