Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[easy] If, and.
#4
You want to check the other numbers also
n1=int(input("N1: "))
n2=int(input("N2: "))
n3=int(input("N3: "))
for num in [n1, n2, n2]:
    ## a number will never be greater than itself
    ## so there is no harm in comparing it to itself
    if num >= n1 and num >= n2 and num >= n3:
        print(num)
Reply


Messages In This Thread
[easy] If, and. - by Henry26 - Jul-17-2018, 02:07 PM
RE: [easy] If, and. - by mlieqo - Jul-17-2018, 02:19 PM
RE: [easy] If, and. - by Henry26 - Jul-17-2018, 06:34 PM
RE: [easy] If, and. - by woooee - Jul-17-2018, 06:43 PM
RE: [easy] If, and. - by Henry26 - Jul-18-2018, 06:36 PM
RE: [easy] If, and. - by nilamo - Jul-18-2018, 07:05 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020