aayushi-droid/Python-Thunder

Flip the Boolean

sark-2110 opened this issue · 3 comments

Before jumping into Pr first comment for assign.All Problem from Edabit. Link is mandatory to add

**Problem statement:**Create a function that reverses a boolean value and returns the string "boolean expected" if another variable type is given.

Examples
reverse(True) ➞ False

reverse(False) ➞ True

reverse(0) ➞ "boolean expected"

reverse(None) ➞ "boolean expected"
Problem Link: https://edabit.com/challenge/NLY7zGMYocsTbeS6n


Before submitting a PR please Check some details. Check Edabit for problem task

  • fileName format should be in camelcase
    example- returnTheNextNumber.py
  • Add label for Problem
  • In file there should be problem statement and link to probelm
    example -
'''
    Probem Task : It will flip value of boolean
    Problem Link :  https://edabit.com/challenge/NLY7zGMYocsTbeS6n

'''
*/
def reverse(arg):
    if type(arg) != bool:
        return "boolean expected"
    else:
        return not arg

This repository is valid for HacktoberFest2020

Read before making PR - How to contribute on Github
Good Luck,

Please assign me this issue.

This issue is stale because it has been open for 30 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.