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)

3,444 thoughts on “Contoh Soal Pemrograman – Menghitung Biaya Parkir

  1. No, you cannot renew a driving license online. You can only fill the driving form online and schedule an appointment for your driving test. You will have to appear for the driving test only after which you will get your renewed driving license. Renewal Driving Licence in Maharashtra Application form for Renewal Driving Licence renew DL fees Grace period is 30 day after your driving licence expire date. Driving licence expire aftre 20 year. You will have to pay a higher fee if you do not renew in the grace period. If the application for renewal is made previous to, or not more than 30 days after the date of expiry of the licence, the renewal will be made with effect from the date of its expiry. If the application is made more than 30 days after the date of expiry of the licence, the renewal will be made with effect from the date of receipt of proper application. In such cases a fee of Rs. 30 – will be realised. http://kameronhyaq642197.bligblogging.com/10595086/maid-for-me The cost to demo a kitchen can vary depending on how much of the space you’re demolishing. A full kitchen demolition, including plumbing moving costs, can cost anywhere from $1,205 to $2,160. But if you are only demolishing part of your kitchen, or keeping your plumbing as-is, your costs may be much lower. The following table provides a breakdown of how much a partial kitchen demolition might cost:   While a more expansive kitchen remodel can completely transform and update your interior, minor kitchen updates can still bring some fresh, new life into the space. If you’re not quite sure which is the right option for you, reach out to us to set up a consultation meeting. We can go over your budget and goals for your project to help you choose the right type of kitchen remodel.

  2. Wow that was unusual. I just wrote an extremely long comment but after I clicked submit my comment didn’t appear.
    Grrrr… well I’m not writing all that over again. Anyhow,
    just wanted to say excellent blog!

Comments are closed.