Ask coding questions

← Back to all posts
Why do i get "the best value is 0"?
Kavin1983 (1)

I did this super simple program but somehow I messed up, any ideas?

Answered by mesquite2234 (278) [earned 5 cycles]
View Answer
Comments
hotnewtop
mesquite2234 (278)

You want to do

top = battery["brand"]

not

(battery["brand"]) = top

With the 2nd one, its saying the brand of the battery now = 0, not top now equals the battery brand

MikeJMS8910 (105)

line 10 you put top = 0 this would change top to 0

Kavin1983 (1)

thanks for all the info, it worked!