[Python] Write a python program which finds the maximum number from num1 to num2 (num2...

Discussão em 'Python' iniciado por Stack, Março 28, 2025.

  1. Stack

    Stack Membro Participativo

    Kindly Explain the problem, I am not getting any clue how to solve. Even asked GPT, but what the problem wants is still out of my mind. If anyone eager to help ,please.

    Problem:

    Write a python program which finds the maximum number from num1 to num2 (num2 inclusive) based on the following rules.

    1. Always num1 should be less than num2
    2. Consider each number from num1 to num2 (num2 inclusive). Populate the number into a list, if the below conditions are satisfied
    3. Sum of the digits of the number is a multiple of 3
    4. Number has only two digits
    5. Number is a multiple of 5
    6. Display the maximum element from the list In case of any invalid data or if the list is empty, display -1.

    Continue reading...

Compartilhe esta Página