Search This Blog

Tuesday, 3 August 2021

Number is even or odd?

1. Check the given is Even or Odd?

 Sol:   

             n=int(input("Enter a number:"))

            if n%2==0: print("Even")

            else: print("Odd")

Output:

                Enter a number: 10 

                Even

                Enter a number: 5

                Odd


String Problem

Description In a certain encrypted message which has information about the location(area, city), the characters are jumbled such that first ...