Ask coding questions

← Back to all posts
i need help to calculate the middle number anyone know
coolkidkelly

dont make it too complicated

Voters
JK-10KA-921949
coolkidkelly
Comments
hotnewtop
Wumi4

With your code, this shouldn't be too complicated. Just simply pack all the variables into one list, remove the largest and smallest, then keep only the middle variable in there.

Here is a example:

I know this is complex, but that's the only way I found so far.

Spacecraft

How about this:

Spacecraft

@coolkidkelly Python has a built in sort function for lists. The default order for .sort() is smallest to largest.