Contoh Soal Pemrograman – Menghitung Biaya Parkir

Pemrograman Python

Berikut adalah contoh soal menggunakan bahasa pemrograman Python.

Buatlah program Python untuk menghitung biaya parkir di sebuah rumah sakit berdasarkan lama parkir. Lama parkir dihitung dari selisih jam masuk dan jam keluar. Jam masuk dan jam keluar diisi 1-24. Biaya parkir adalah Rp. 2.000,- per jam.

Contoh tampilan program:
Jam masuk    : 10 (input)
Jam keluar     : 14 (input)
Lama parkir  : 4 jam (keluaran program)
Biaya parkir  : 8000 (keluaran program)

Berikut kode program yang dapat dibuat untuk menyelesaikan soal tersebut.


jam_masuk = int(input("Jam Masuk  : "))
jam_keluar = int(input("Jam Keluar  : "))

lama_parkir = jam_keluar - jam_masuk
biaya_parkir = lama_parkir * 2000

print("Lama Parkir : ", lama_parkir)
print("Biaya Parkir : ", biaya_parkir)

4,199 thoughts on “Contoh Soal Pemrograman – Menghitung Biaya Parkir

  1. hello there and thank you for your information – I’ve certainly picked up
    anything new from right here. I did however expertise a few technical points using this site,
    as I experienced to reload the web site a
    lot of times previous to I could get it to load correctly.

    I had been wondering if your web host is OK? Not that I’m complaining, but sluggish loading instances times will very frequently affect your placement in google and could
    damage your quality score if advertising and marketing with Adwords.
    Well I am adding this RSS to my e-mail and can look out
    for a lot more of your respective intriguing
    content. Ensure that you update this again soon.

  2. 1382 Route 9Gansevoort, NY 12831(518) 793-0153 (FAX) 793-1994 Another way to prevent getting this page in the future is to use Privacy Pass. You may need to download version 2.0 now from the Chrome Web Store. Totally amazing staff!!!! Homes were staged JUST LIKE HOME!!! Never seen anything other mobile home store like it!!!! Amazing place. Would definitely recommend. Thank you for your knowledgeable help!!!!! You can buy a manufactured home with a loan insured by the Federal Housing Administration (FHA). FHA manufactured home loans finance a manufactured home only, a developed lot for placement or a manufactured home with land. In addition, you can use an FHA manufactured home loan for a home installed on a leased lot. Terms range from 15 to 25 years. Please stand by, while we are checking your browser… https://enemyofthestatepatriots.com/community/profile/willierechner10/ Quite honestly, building codes for tiny houses is hit and miss. Some states have progressive building codes while others do not. Currently, the International Residential Code says the minimum size of a tiny home is 120 square feet. However, that is supposed to shrink to 88 square feet in 2018. The future minimum size includes 70 square feet for a livable room and at least 18 square feet for a separate bathroom. National Association of Homebuilders. “Addressing the Supply Chain Issue.” Accessed Nov. 29, 2021. Notice that the CaSe is important in this example. On platforms that enforce case-sensitivity PNG and png are not the same locations. Homepage Our Listings Calculator Agents Why You Need It: Everything is new in this chic and simple tiny home, totaling 137 square feet. With one loft bed and one bathroom, this tiny home is ready to roll and completely mobile.

Comments are closed.