Check Equality of Two Integers

PythonBeginner
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.

This is a Challenge, which differs from a Guided Lab in that you need to try to complete the challenge task independently, rather than following the steps of a lab to learn. Challenges are usually a bit difficult. If you find it difficult, you can discuss with Labby or check the solution.

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.