What's new
  • Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as: All that and more! Registration is quick, simple and absolutely free. Join our community today!

aa1012

Addict
, Last edited:
Assuming Vehicle Price is P500.00 and your Loan Term is 36mos.

DP = vehicle_price * downpayment_percentage (eg: 500*0.20)
loan_amt = vehicle_price - DP (eg: 500-100)
monthly_amort = loan_amt * (interest_rate_per_anum / 12) (eg: 400 * 0.399)

monthly_amort will be payable within the selected loan_term (eg: 36/48/60)

So dapat sana may kabuuan pa ng payable kasi mawawalan ng saysay yung loan_term.


Suggestions:

-yung pagpili ng bank dapat naka format na katulad nito:

Code:
========LIST_OF_BANKS========

1. Metro Bank (Interest rate per anum: 4.79)
2. Security Bank (Interest rate per anum: 5.07)
3. BPI Islands (Interest rate per anum: 5.36)

=============================

Choose Your Bank (press number):
Tas yung program flow mo is number na lang ang expression something like:

C++:
...
if(_bank == 1)
{
    //Statements here...
}
else if(_bank == 2)
{
    Statements here...
}
N...
In that way, mas maganda ang presentation mo sa user. Tapos gandahan mo naman onti yung presentation mo sa ouput.

Ignore mo yung sample codes ko kasi C++ Snippet lang yan. Hindi kasi ako nag-pa-Python e.
 

PHC rem

Honorary Poster
Assuming Vehicle Price is P500.00 and your Loan Term is 36mos.

DP = vehicle_price * downpayment_percentage (eg: 500*0.20)
loan_amt = vehicle_price - DP (eg: 500-100)
monthly_amort = loan_amt * (interest_rate_per_anum / 12) (eg: 400 * 0.399)

monthly_amort will be payable within the selected loan_term (eg: 36/48/60)

So dapat sana may kabuuan pa ng payable kasi mawawalan ng saysay yung loan_term.


Suggestions:

-yung pagpili ng bank dapat naka format na katulad nito:

Code:
========LIST_OF_BANKS========

1. Metro Bank (Interest rate per anum: 4.79)
2. Security Bank (Interest rate per anum: 5.07)
3. BPI Islands (Interest rate per anum: 5.36)

=============================

Choose Your Bank (press number):
Tas yung program flow mo is number na lang ang expression something like:

C++:
...
if(_bank == 1)
{
    //Statements here...
}
else if(_bank == 2)
{
    Statements here...
}
N...
In that way, mas maganda ang presentation mo sa user. Tapos gandahan mo naman onti yung presentation mo sa ouput.

Ignore mo yung sample codes ko kasi C++ Snippet lang yan. Hindi kasi ako nag-pa-Python e.
ganyan din ginawa ko nong una paps..kaso pinapakuha ng tester namin....simplehan konalang daw muna..
 

PHC rem

Honorary Poster
Project ba yan sa school? Ngayon pa lang ako nakarinig na ayaw ng mas magandang output.:p:ROFLMAO:
Kya nga paps eh...yong una kong project non...ilang araw ko ginawa at pinaganda...tapos..pag ka...pasa ko sa teacher ko..tinanong niya ko bat may nga ganon sa code ko..sabi ko...pinapaganda ko kasi maam..para maayos tingnan
 

aa1012

Addict
Kya nga paps eh...yong una kong project non...ilang araw ko ginawa at pinaganda...tapos..pag ka...pasa ko sa teacher ko..tinanong niya ko bat may nga ganon sa code ko..sabi ko...pinapaganda ko kasi maam..para maayos tingnan
Patay tayo jan! hahaha! sa School namin noo our profs are the once who's very proud kapag malulupet ang gawa namin at may mga inincorporate kaming mga techniques at codes na hindi pa tinuturo. Hindi ko alam kung anong klaseng school of programming yang school nyo at parang ayaw maging magaling ang mga studyante nila. Ano yan? feeling nya mas magaling ka na sa kanya kaya ayaw nya sa magandang output? haha!

I advise you to look for another school and transfer. Baka di ka mag grow sa school na yan. hahaha!
 

PHC rem

Honorary Poster
Patay tayo jan! hahaha! sa School namin noo our profs are the once who's very proud kapag malulupet ang gawa namin at may mga inincorporate kaming mga techniques at codes na hindi pa tinuturo. Hindi ko alam kung anong klaseng school of programming yang school nyo at parang ayaw maging magaling ang mga studyante nila. Ano yan? feeling nya mas magaling ka na sa kanya kaya ayaw nya sa magandang output? haha!

I advise you to look for another school and transfer. Baka di ka mag grow sa school na yan. hahaha!
mabait naman siya paps..gusto niya ata muna matuto yong mga classmate ko kasi..mahihina sila sa programming e...kaya siguro pina pa simplehan niya lang
 

aa1012

Addict
mabait naman siya paps..gusto niya ata muna matuto yong mga classmate ko kasi..mahihina sila sa programming e...kaya siguro pina pa simplehan niya lang
E di dapat hayaan nya lang yung sayo kasi individual naman yata yan. Sayang naman ang potential kung pipigilan.
 

Shiraori

Enthusiast
hahaha, sarap mag solve ng mga ganto.

eto take ko sa problem na yan ts
Python:
_bank_data = [
    ("Metrobank Car Loan", 4.79),
    ("Security Bank Car Loan", 5.07),
    ("BPI Auto Loan", 5.36),
    ("Eastwest Bank Auto Loan", 5.83),
    ("RCBC Savings Bank Auto Loan", 5.05),
    ("PNB Sure Wheels Auto Loan", 5.35),
    ("Chinabank AutoPlus Loan", 5.39),
    ("Union Bank Auto Loan", 5.61)
]
_vehicle_type = ["Brand New", "Pre-Owned"]
_terms = [60, 48, 36]
_down_pay = [20, 30, 40]

print("Select Vehicle Type:")
for i in _vehicle_type:
    print(f'\t{_vehicle_type.index(i) + 1}.) {i}')
_inp = int(input(f"Select one (1/{len(_vehicle_type)}) >> "))
if 0 < _inp < len(_vehicle_type):
    vehicle_type = _vehicle_type[_inp - 1]
    print("Select Bank Loan:\n\t#\t% p.a.\tBank Name")
    for i in _bank_data:
        print(f"\t{_bank_data.index(i) + 1}.) {i[1]}%\t{i[0]}")
    _inp = int(input(f"Enter desired bank (1~{len(_bank_data)}) >> "))
    if 0 < _inp < len(_bank_data):
        bank_name = _bank_data[_inp - 1][0]
        interest_rate = _bank_data[_inp - 1][1]
        print("Select Loan Term:")
        for i in _terms:
            print(f'\t{_terms.index(i) + 1}.) {i} Months')
        _inp = int(input("Loan Term [1~3] >> "))
        if 0 < _inp < len(_terms):
            loan_term = _terms[_inp - 1]
            vehicle_price = float(input("Vehicle Price >> "))
            print("Select Down Payment Amount:")
            for i in _down_pay:
                print(f'\t{_down_pay.index(i) + 1}.) {i}%')
            _inp = int(input(f"Amount % Selection [1~{len(_down_pay)}] >> "))
            if 0 < _inp < len(_down_pay):
                down_pay = int(_down_pay[_inp - 1])
                down_pay_amt = round(float(down_pay / 100) * vehicle_price, 2)
                loan_amt = round(vehicle_price - down_pay_amt, 2)
                amt_interest = (loan_amt * (interest_rate * (loan_term / 12)) / 100)
                m_amort = round((loan_amt + amt_interest) / loan_term, 2)
                m_amort_last = round(amt_interest + loan_amt - (m_amort * loan_term) + m_amort, 2)
                print(f'Vehicle Type:         {vehicle_type}\n'
                      f'Bank Name:            {bank_name}\n'
                      f'Loan Term:            {loan_term} Months\n'
                      f'Vehicle Price:        {vehicle_price} php\n'
                      f'Down Payment:         {down_pay}%\n'
                      f'Down Payment Amount:  {down_pay_amt} php\n'
                      f'Loan Amount:          {loan_amt} php\n'
                      f'Interest Rate:        {interest_rate}%\n'
                      f'Monthly Amortization: {m_amort} php; ({m_amort_last} php on last term)')
                input()
            else:
                print("Invalid Down Payment Amount %")
        else:
            print("Invalid Loan Term")
    else:
        print("Invalid Bank")
else:
    print("Invalid Vehicle Type")
di ko lang sure kung tama yung computation :LOL:
output.PNG
 

PHC rem

Honorary Poster
hahaha, sarap mag solve ng mga ganto.

eto take ko sa problem na yan ts
Python:
_bank_data = [
    ("Metrobank Car Loan", 4.79),
    ("Security Bank Car Loan", 5.07),
    ("BPI Auto Loan", 5.36),
    ("Eastwest Bank Auto Loan", 5.83),
    ("RCBC Savings Bank Auto Loan", 5.05),
    ("PNB Sure Wheels Auto Loan", 5.35),
    ("Chinabank AutoPlus Loan", 5.39),
    ("Union Bank Auto Loan", 5.61)
]
_vehicle_type = ["Brand New", "Pre-Owned"]
_terms = [60, 48, 36]
_down_pay = [20, 30, 40]

print("Select Vehicle Type:")
for i in _vehicle_type:
    print(f'\t{_vehicle_type.index(i) + 1}.) {i}')
_inp = int(input(f"Select one (1/{len(_vehicle_type)}) >> "))
if 0 < _inp < len(_vehicle_type):
    vehicle_type = _vehicle_type[_inp - 1]
    print("Select Bank Loan:\n\t#\t% p.a.\tBank Name")
    for i in _bank_data:
        print(f"\t{_bank_data.index(i) + 1}.) {i[1]}%\t{i[0]}")
    _inp = int(input(f"Enter desired bank (1~{len(_bank_data)}) >> "))
    if 0 < _inp < len(_bank_data):
        bank_name = _bank_data[_inp - 1][0]
        interest_rate = _bank_data[_inp - 1][1]
        print("Select Loan Term:")
        for i in _terms:
            print(f'\t{_terms.index(i) + 1}.) {i} Months')
        _inp = int(input("Loan Term [1~3] >> "))
        if 0 < _inp < len(_terms):
            loan_term = _terms[_inp - 1]
            vehicle_price = float(input("Vehicle Price >> "))
            print("Select Down Payment Amount:")
            for i in _down_pay:
                print(f'\t{_down_pay.index(i) + 1}.) {i}%')
            _inp = int(input(f"Amount % Selection [1~{len(_down_pay)}] >> "))
            if 0 < _inp < len(_down_pay):
                down_pay = int(_down_pay[_inp - 1])
                down_pay_amt = round(float(down_pay / 100) * vehicle_price, 2)
                loan_amt = round(vehicle_price - down_pay_amt, 2)
                amt_interest = (loan_amt * (interest_rate * (loan_term / 12)) / 100)
                m_amort = round((loan_amt + amt_interest) / loan_term, 2)
                m_amort_last = round(amt_interest + loan_amt - (m_amort * loan_term) + m_amort, 2)
                print(f'Vehicle Type:         {vehicle_type}\n'
                      f'Bank Name:            {bank_name}\n'
                      f'Loan Term:            {loan_term} Months\n'
                      f'Vehicle Price:        {vehicle_price} php\n'
                      f'Down Payment:         {down_pay}%\n'
                      f'Down Payment Amount:  {down_pay_amt} php\n'
                      f'Loan Amount:          {loan_amt} php\n'
                      f'Interest Rate:        {interest_rate}%\n'
                      f'Monthly Amortization: {m_amort} php; ({m_amort_last} php on last term)')
                input()
            else:
                print("Invalid Down Payment Amount %")
        else:
            print("Invalid Loan Term")
    else:
        print("Invalid Bank")
else:
    print("Invalid Vehicle Type")
di ko lang sure kung tama yung computation :LOL:
View attachment 707237
Thank you po sa pag share ng mga codes niyo hehehe..matagal ko na pong natapos yan😂😂
 

Unanswered Topics

Top