Professional Documents
Culture Documents
27 Set5 PDS
27 Set5 PDS
27 Set5 PDS
Practical set :- 5
Implemented By :- 190760107027
Color Value
Blue 1
Black 2
White 3
Green 4
Red 5
Yellow 6
Magenta 7
Cyan 8
Purple 9
Pink 10
Color Value
Blue 1
Black 2
White 3
Green 4
Red 5
Yellow 6
Magenta 7
Cyan 8
Purple 9
Pink 10
In [13]: 1 num = 3
2 with open("colors.txt") as color:
3 for index, data in enumerate(color):
4 if index % num == 0:
5 print(f"Index : {index}, line: {data}")
0.8273041205294981
0.4832116347831039
0.10678505093022406
0.36176305196078795
0.3150499470107109
0.35566184656440303
0.11726326020016775
0.25132981078751415
0.056989782261438804
0.5699636014819119
0.5567600679035656
0 Dosan 98 85 95
1 Paxton 75 80 86
2 Daalmi 92 97 92
student
In [21]: 1 data