Hedwigeeeee
Badges: 18
Rep:
?
#1
Report Thread starter 2 weeks ago
#1
can any help me with this project?we cannot apply index in set so what should we do? many thanks
Last edited by Hedwigeeeee; 2 weeks ago
0
reply
mqb2766
Badges: 19
Rep:
?
#2
Report 2 weeks ago
#2
(Original post by Hedwigeeeee)
can any help me with this project?we cannot apply index in set so what should we do? many thanks
Does the sum() function work directly on it? If not, convert to a list() first?
Last edited by mqb2766; 2 weeks ago
0
reply
Composure
Badges: 8
Rep:
?
#3
Report 2 weeks ago
#3
Like previous commenter said, you just provide the set as an argument to the sum() function -- which will return an integer. Not sure what you're talking about in regards to an index.
1
reply
Hedwigeeeee
Badges: 18
Rep:
?
#4
Report Thread starter 2 weeks ago
#4
(Original post by mqb2766)
Does the sum() function work directly on it? If not, convert to a list() first?
Thanks!I tried this method and it works
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

How are you feeling now you've started university?

I'm loving it! (51)
13.9%
I'm enjoying it but I'm still settling in (94)
25.61%
I'm a bit unsure (63)
17.17%
I'm finding things difficult (127)
34.6%
Something else (let us know in the thread!) (32)
8.72%

Watched Threads

View All