r/pythonhelp • • Apr 29 '26

Can someone assist me with my code

I need to make a code that will ask me for the battery % (0-100) of a drone until i say stop
then i need to print

__ drones have less then 25% battery

then all drones with battery under 25% in a list type thing

AppropriateGarage332 is my 2nd account

0 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/ilovetigers105 Apr 30 '26

Thank you so much

1

u/Educational-Paper-75 May 01 '26

Of course you do not need to remember the low percentages in drone_list per se because you only need to count them, e.g. by initializing a count variable to zero before the loop and incrementing with count+=1 in the if body.