Check Equality of Two Integers

PythonPythonBeginner
Practice Now

Introduction

In this lab, you need to create a function that accepts two integer arguments and checks if they are equal or not, returning True if they are equal and False otherwise.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL python(("Python")) -.-> python/BasicConceptsGroup(["Basic Concepts"]) python(("Python")) -.-> python/ControlFlowGroup(["Control Flow"]) python(("Python")) -.-> python/FunctionsGroup(["Functions"]) python/BasicConceptsGroup -.-> python/booleans("Booleans") python/ControlFlowGroup -.-> python/conditional_statements("Conditional Statements") python/FunctionsGroup -.-> python/arguments_return("Arguments and Return Values") subgraph Lab Skills python/booleans -.-> lab-108246{{"Check Equality of Two Integers"}} python/conditional_statements -.-> lab-108246{{"Check Equality of Two Integers"}} python/arguments_return -.-> lab-108246{{"Check Equality of Two Integers"}} end

Check Equality of Two Integers

Problem Statement

Write a program to create a function check_equality() that checks if two integer arguments num1 and num2 are equal or not.

Function Signature

def check_equality(num1: int, num2: int) -> bool:

Input

  • Two integers, num1 and num2.

Output

  • Returns True if num1 and num2 are equal.
  • Returns False if num1 and num2 are not equal.

Example

Input:

num1 = 1
num2 = 2

Output:

False
โœจ Check Solution and Practice

Summary

Congratulations! You have completed Check if Two Arguments Are Equal. You can practice more labs in LabEx to improve your skills.