Created
March 8, 2022 09:26
-
-
Save QuintD/14b8be3b20991b737a794402ea791a03 to your computer and use it in GitHub Desktop.
this is an exercise with Set in python. To check the highest item in a set of numbers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| b_set = {5, 20, 70, 46, 50} | |
| highestNum = 0 | |
| for item in b_set: | |
| if item > highestNum: | |
| highestNum = item | |
| print("the item with the highest vale in", b_set, "is", highestNum) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment