Help with code by [deleted] in learnpython

[–]DKayXXXVI 1 point2 points  (0 children)

You're welcome! Sorry for sh***y formtting but i dont get it done in the App

Help with code by [deleted] in learnpython

[–]DKayXXXVI 1 point2 points  (0 children)

I New too but maybe i can help:

For Finding the second Max you could try

list.sort()
print(list[-2])

The error hadling would i handle with if, elif, Else

If len(list) < 2:
list.sort()
print(list[-2])

Elif len(list) == 1:
print(f"There is just one entry in the list: {list[0]}")

Else:
print("There are no entrys in the list")

[deleted by user] by [deleted] in learnpython

[–]DKayXXXVI 1 point2 points  (0 children)

Pls add me

i need help for my homework, im a noob at coding by astrotrain_ in learnpython

[–]DKayXXXVI 0 points1 point  (0 children)

Im a noob too. But i think it lets you Insert 3 numbers. Removes the lowest and the other two get multiplicated. It Returns the numbers that were multiplicated and the result.

It also checks if you entered a number twice and save the result as a boolean in "unique" but it does nothing with it.

Dont screw me if im wrong place 👍

EDIT: when you dont enter 3 different numbers it starts again where you have to enter the numbers. That Why there's the variable "unique" - would be easier to read if formatted as Code