Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 01 ex05 #236

Open
Mazoise opened this issue May 8, 2022 · 1 comment
Open

Python 01 ex05 #236

Mazoise opened this issue May 8, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Mazoise
Copy link

Mazoise commented May 8, 2022

  • Day: 01
  • Exercise: 05

Dans les tests qui sont donnés avec le sujet (banking_test1.py && banking_test2.py), l'output c'est "Failed" si on valide l'exercice. Ça prète à confusion.

Dans le test1 le compte est corrompu donc au lieu de ça :

    if bank.transfer('William John', 'Smith Jane', 545.0) is False:
        print('Failed')
    else:
        print('Success')

ce serait mieux de mettre :

    if bank.transfer('William John', 'Smith Jane', 545.0) is False:
        print('Success : The bank transfer failed since the accounts were corrupted')
    else:
        print('Fail : The bank transfer was made even though the accounts were corrupted')

et pour le test2 :

    if bank.transfer('William John', 'Smith Jane', 1000.0) is False:
        print('Success : The bank transfer failed since the accounts were corrupted')

        bank.fix_account('William John')
        bank.fix_account('Smith Jane')

        if bank.transfer('William John', 'Smith Jane', 1000.0) is False:
            print('Fail : The bank transfer failed even though the accounts should have been fixed')    
        else:
            print('Success : The bank transfer was made since the accounts were properly fixed')
    else:
        print('Fail : The bank transfer was made even though the accounts were corrupted')
@Mazoise Mazoise added the fixme label May 8, 2022
@qfeuilla
Copy link
Member

les deux peuvent porter a confusion, je met ca comme enhancment

@qfeuilla qfeuilla added enhancement New feature or request and removed fixme labels May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants