Skip to content

Murodjon002/logical_operators_homework

 
 

Repository files navigation

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

logic01

Given three integers a, b, c, check the following statement "The number b is between a and c".

Example 1:

Input: a=3 b=4 c=5
Output: True

Example 2:

Input: a=6 b=4 c=5
Output: False

Example 3:

Input: a=6 b=4 c=1
Output: True

Constraints:

  • -1018<=num<=1018

logic02

Given two integers a, b, check the following statement "Each of the numbers 'a' and 'b' is positive".

Example 1:

Input: a=5 b=3
Output: True

Example 2:

Input: a=6 b=-4
Output: False

Constraints:

  • -1018<=num<=1018

logic03

Given two integers a, b, check the following statement "Each of the numbers A and B is negative".

Example 1:

Input: a=-1 b=-3
Output: True

Example 2:

Input: a=6 b=-4
Output: False

Constraints:

  • -1018<=num<=1018

logic04

Given two integers a, b, check the following statement "Each of the numbers a and b is even".

Example 1:

Input: a=3 b=6
Output: False

Example 2:

Input: a=6 b=4
Output: True

Constraints:

  • -1018<=num<=1018

logic05

Given two integers a, b, check the following statement "Each of the numbers A and B is odd".

Example 1:

Input: a=3 b=8
Output: False

Example 2:

Input: a=9 b=1
Output: True

Constraints:

  • -1018<=num<=1018

logic06

Given two integers a, b, check the following statement "At least one of the numbers A and B is positive".

Example 1:

Input: a=-3 b=8
Output: True

Example 2:

Input: a=-9 b=-1
Output: False

Constraints:

  • -1018<=num<=1018

logic07

Given two integers a, b, check the following statement "At least one of the numbers 'a' and 'b' is negative".

Example 1:

Input: a=-3 b=8
Output: True

Example 2:

Input: a=4 b=1
Output: False

Constraints:

  • -1018<=num<=1018

logic08

Given two integers a, b, check the following statement "At least one of the numbers 'a' and 'b' is even".

Example 1:

Input: a=6 b=3
Output: True

Example 2:

Input: a=7 b=1
Output: False

Constraints:

  • -1018<=num<=1018

logic09

Given two integers a, b, check the following statement "At least one of the numbers 'a' and 'b' is odd".

Example 1:

Input: a=5 b=3
Output: True

Example 2:

Input: a=4 b=9
Output: True

Constraints:

  • -1018<=num<=1018

logic10

Given integer a, check the following statement "The integer is two-digit number".

Example 1:

Input: a=3
Output: False

Example 2:

Input: a=12
Output: True

Constraints:

  • -1018<=num<=1018

logic11

Given integer a, check the following statement "The integer is three-digit number".

Example 1:

Input: a=3
Output: False

Example 2:

Input: a=12
Output: False

Example 2:

Input: a=123
Output: True

Constraints:

  • -1018<=num<=1018

logic12

Given a two-digit integer a, check the following statement "All digits of the number are the same".

Example 1:

Input: a=32
Output: False

Example 2:

Input: a=22
Output: True

Constraints:

  • -1018<=num<=1018

logic13

Given a two-digit integer a, check the following statement "All digits sum is even".

Example 1:

Input: a=45
Output: False

Example 2:

Input: a=35
Output: True

Constraints:

  • -1018<=num<=1018

logic14

Given a two-digit integer a, check the following statement "All digits sum is odd".

Example 1:

Input: a=45
Output: True

Example 2:

Input: a=35
Output: False

Constraints:

  • -1018<=num<=1018

logic15

Given a three-digit integer a, check the following statement "All digits sum is odd".

Example 1:

Input: a=152
Output: False

Example 2:

Input: a=335
Output: True

Constraints:

  • -1018<=num<=1018

logic16

Given integer a, check the following statement "The integer is a five-digit number".

Example 1:

Input: a=15234
Output: True

Example 2:

Input: a=763
Output: False

Constraints:

  • -1018<=num<=1018

logic17

Given a five-digit integer a, check the following statement "All digits of the number are in ascending order".

Example 1:

Input: a=75421
Output: True

Example 2:

Input: a=13763
Output: False

Constraints:

  • -1018<=num<=1018

logic18

Given a five-digit integer a, check the following statement "All digits of the number are in descending order".

Example 1:

Input: a=75421
Output: False

Example 2:

Input: a=12347
Output: True

Constraints:

  • -1018<=num<=1018

Warning

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

About

Logical Operation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%