Python-Thunder icon indicating copy to clipboard operation
Python-Thunder copied to clipboard

Flip the Boolean

Open sark-2110 opened this issue 4 years ago • 1 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,

sark-2110 avatar Oct 08 '20 06:10 sark-2110

Please assign me this issue.

sark-2110 avatar Oct 08 '20 06:10 sark-2110

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

github-actions[bot] avatar Sep 28 '22 03:09 github-actions[bot]

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

github-actions[bot] avatar Oct 13 '22 03:10 github-actions[bot]