Welcome

Boolean Data Types

Automated grading of homework assignments and tests

  • fork this repository
  • solve the task
  • commit with proper message
  • commit with proper message

Problems

bool01

Check the logic "they are equal"

Example 1:

Input: a=1 b=1
Output: True

Example 2:

Input: a=3 b=1
Output: False

Constraints:

  • -1018<=num<=1018

bool02

Check the logic "The variable 'a' is equal 7"

Example 1:

Input: a=1
Output: False

Example 2:

Input: a=7
Output: True

Constraints:

  • -1018<=num<=1018

bool03

Check the logic "The variable "b" is positive"

Example 1:

Input: a=-3
Output: False

Example 2:

Input: a=8
Output: True

Constraints:

  • -1018<=num<=1018

bool04

Check the logic "The variable "a" is negative"

Example 1:

Input: a=-3
Output: True

Example 2:

Input: a=8
Output: False

Constraints:

  • -1018<=num<=1018

bool05

Check the logic "The variable "a" is an odd number"

Example 1:

Input: a=8
Output: False

Example 2:

Input: a=5
Output: True

Constraints:

  • -1018<=num<=1018

bool06

Check the logic "The variable "a" is an even number"

Example 1:

Input: a=8
Output: True

Example 2:

Input: a=5
Output: False

Constraints:

  • -1018<=num<=1018

bool07

Check the logic "They are not equal"

Example 1:

Input: a=3 b=1
Output: True

Example 2:

Input: a=5 b=5
Output: False

Constraints:

  • -1018<=num<=1018

bool08

check the whole number. Integers are 0 and a positive number.

Example 1:

Input: a=3
Output: True

Example 2:

Input: a=0
Output: True

Example 3:

Input: a=-1
Output: False

Constraints:

  • -1018<=num<=1018

bool09

Check the natural number. Natural numbers are numbers used in counting.

Example 1:

Input: a=3
Output: True

Example 2:

Input: a=-1
Output: False

Example 3:

Input: a=7
Output: True

Constraints:

  • -1018<=num<=1018, a!=0

bool10

To Check if a number is a perfect square or not

Example 1:

Input: a=9
Output: True

Example 2:

Input: a=15
Output: False

Example 3:

Input: a=121
Output: True

Constraints:

  • -1018<=num<=1018

Warning

  • don't copy other solutions or any solution
  • don't remove comments