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)

732 thoughts on “Contoh Soal Pemrograman – Menghitung Biaya Parkir

  1. Howdy! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results. If you know of any please share.

  2. I’ve been surfing online greater than three hours as of late, yet I by no means found any fascinating article like yours. It¡¦s lovely value enough for me. In my view, if all site owners and bloggers made just right content as you probably did, the internet can be much more useful than ever before.

  3. I rarely comment, but i did a few searching and wound up
    here Contoh Soal Pemrograman – Menghitung Biaya Parkir – Umar faisol.
    And I do have a couple of questions for you if you usually
    do not mind. Could it be simply me or does it look like a few of the responses come across
    like coming from brain dead visitors? 😛 And, if you are
    posting on additional online sites, I’d like to keep up
    with anything new you have to post. Would you make a list of the complete urls of your public sites like your linkedin profile, Facebook page or twitter feed?

    Feel free to surf to my web-site … Solvolt

  4. I want to express my thanks to this writer just for rescuing me from this particular scenario. Just after looking out throughout the internet and obtaining solutions which were not productive, I assumed my life was gone. Living without the approaches to the problems you have fixed through your website is a crucial case, as well as ones that could have in a wrong way damaged my career if I hadn’t discovered your web page. Your training and kindness in taking care of everything was helpful. I’m not sure what I would’ve done if I had not encountered such a thing like this. I’m able to at this time look ahead to my future. Thanks for your time very much for your high quality and result oriented help. I won’t be reluctant to suggest your blog post to anyone who would like direction about this subject matter.

  5. Wonderful article! We will be linking to this great article on our site. Keep up the great writing.
    Really appreciate you sharing this article.Really looking forward to read more. Great.

  6. I think the admin of this web site is truly working hard in favor of his website, for the reason that here every information is quality based data.

  7. Hi, Neat post. There is a problem together with your website in internet explorer, may check
    this? IE nonetheless is the marketplace chief and a large element of folks will pass over your fantastic
    writing because of this problem.

    Also visit my webpage EcoHack Fuel Saver

  8. I am now not positive the place you are getting your information, but good topic.
    I must spend some time learning much more or working out
    more. Thanks for fantastic info I used to be looking for this information for my mission.

Leave a Reply

Your email address will not be published. Required fields are marked *