Print highest /lowest number in a tuple

Hi , sir /mam please help me with my dought Basically i have to print highest/ lowest number in a tuple but it is not working please help me i am trying to drop image here but not working so i ma writing the code here .

numbers = (1,2,3)
highest = max(numbers)
lowest = min (numbers)
print (“highest number is” , highest)
Print (“lowest number is”, lowest )

The above mentioned is the code which is showing error please help me with this .

Thankyou
Shubham keswani

Hi @shubhamkswn00
image
Above mentioned code was working fine, the only change that I made was in the last line where the syntax of print statement was incorrect (i.e P shouldn’t have being in uppercase it should be in lower case)

Hope this might helps :slight_smile:

Same code but showing output something else

Hi @shubhamkswn00 Output should be different logically as the input in both the case are different, Earlier the example I took had (1,2,3) as the tuple and in the following example the tuple is (1,2,5) So the value of highest number in both the tuple are different

Hope this might helps :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.