Computer Science, asked by donbhai135, 8 months ago

}
10. Write a program that inputs a number and tests if the given number is a multiple of both 3 and 5.
11. Write a program that inputs a characters and prints if the typed character is in uppercase or
lowercase​

Answers

Answered by Equestriadash
5

The following codes have been written using Python.

10.

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

if n%3 == 0 and n%5 == 0:

   print(n, "is a multiple of both 3 and 5.")

else:

   print(n, "is NOT a multiple of both 3 and 5.")

11.

c = input("Enter any character: ")

if c.isalpha():

   if c.isupper():

       print(c, "is in UPPER case form.")

   elif c.islower():

       print(c, "is in LOWER case form.")

else:

   print(c, "is not a letter.")

  • isalpha() is a method that results to True only if the string consists of letters alone.
  • isupper() is a method that results to True only if the character is in upper case form.
  • islower() is a method that results to True only if the character is in lower case form.
Similar questions