NewStats: 3,264,682 , 8,184,410 topics. Date: Thursday, 12 June 2025 at 02:43 AM 1lo6k6z3e3g |
(1) (of 1 pages)
![]() |
def binary_converter(x): if(x==0): return "000" elif(x<0): return "Invalid input" elif(x>255): return "Invalid input" else: i=1 binaryfinal=0 while(x>0): tempvar=x%2 x=x/2 binaryfinal += (tempvar*i); i *= 10; return binaryfinal help on that if u can |
![]() |
that code saved me ![]() khaynoni: |
![]() |
hi my deadline is today in the next six hours done 69% of the proctor test ....... need help with the labs oop lab : error THERE IS AN ERROR/BUG IN YOUR CODE Results: {"finished": true, "success": [{"fullName": "test_current__can_deposit_valid_amounts", "edSpecNumber": 1}, {"fullName": "test_current__can_withdraw_valid_cash_amounts", "edSpecNumber": 2}, {"fullName": "test_current__is_instance_of_bank_", "edSpecNumber": 3}, {"fullName": "test_savings__can_deposit_valid_amounts", "edSpecNumber": 4}, {"fullName": "test_savings__is_instance_of_bank_", "edSpecNumber": 5} ], "ed": false, "started": true, "failures": [ {"failedSpecNumber": 1, "fullName": "test_current__cannot_withdraw_more_than_current_balance", "failedExpectations": [{"message": "Failure in line 24, in test_current__cannot_withdraw_more_than_current_balance\n self.assertEquals(message, 'Cannot withdraw beyond the current balance', msg='No overdrafts')\nAssertionError: No overdrafts\n"}] }, {"failedSpecNumber": 2, "fullName": "test_savings__can_withdraw_valid_amounts_successfully", "failedExpectations": [{"message": "Failure in line 53, in test_savings__can_withdraw_valid_amounts_successfully\n self.assertEquals(2257, self.sa.balance, msg=\"Incorrect balance after withdrawal\" ![]() }, {"failedSpecNumber": 3, "fullName": "test_savings__cannot_withdraw_more_than_current_balance", "failedExpectations": [{"message": "Failure in line 48, in test_savings__cannot_withdraw_more_than_current_balance\n self.assertEquals(message, 'Cannot withdraw beyond the current balance', msg='No overdrafts')\nAssertionError: No overdrafts\n"}]}], "specs": {"count": 8, "pendingCount": 0, "time": "0.000071"} } Invalid Withdraw Amount |
(1) (of 1 pages)
(Go Up)
Sections: How To . 8 Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or s on Nairaland. |