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,212 thoughts on “Contoh Soal Pemrograman – Menghitung Biaya Parkir

  1. That’s right. Dogecoin’s mascot is a shiba inu dog that became an internet meme in 2013. Unlike Bitcoin, it’s not really in the conversation for being a good store of value, either: Currently, there are more than 129 billion DOGE in existence. There are less than 19 million Bitcoin around, and only 21 million that can ever exist. There’s no cap on the maximum number of Dogecoin units, and billions more are created each year. Cryptocurrency price today: After profit-booking in last few sessions, fresh buying has gained momentum in most of the cryptocurrencies in last 24 hours. Cryptocurrency major Bitcoin price has surged 2.61 per cent in last 24 hours whereas Terra, Ethereum, Shiba Inu, Dogecoin, Solana, etc. have logged decent gain in this time. Dogecoin has registered staggering 18.25 per cent rise in last 24 hours. Cudo Miner bridges the gap between powerful command line and simple-to-use GUI miners, with advanced features and monitoring unmatched by other leading mining software. A smart cryptocurrency miner that’s both simple-to-use and advanced in control, enabling you to fine-tune your mining for maximum returns in multiple currency options. Discover Bitfarms Interestingly, you can purchase a Bitmain Antminer from their website. And it will mine Bitcoins at their mining facility. Finally, you have the choice to get it shipped to your address at your convenience. They pay daily for cloud mining and miner hosting contracts. All detailed statistics you can see into your account. REGISTER AND BUY CRYPTO Bitcloud had an all time low of $0.000004931955 on Apr 23, 2020 (about 2 years). Unfortunately, the same apparent profitability, convenience, and pseudonymity of cryptocurrencies also made them ideal for cybercriminals, as ransomware operators showed. The increasing popularity of cryptocurrencies coincide with the incidences of malware that infect systems and devices, turning them into armies of cryptocurrency-mining machines.

Comments are closed.