Skip to content

Instantly share code, notes, and snippets.

@stevenfrst
Created September 23, 2019 12:24
Show Gist options
  • Save stevenfrst/bcb7d339bd37b405830ac6b695529904 to your computer and use it in GitHub Desktop.
Save stevenfrst/bcb7d339bd37b405830ac6b695529904 to your computer and use it in GitHub Desktop.
pdp02.py
# #Case 1
# nAyah = "Eko"
# nIbu = "Joni"
# print("Nama Ayah ",nAyah," Nama Ibu ",nIbu)
# #Case 2
# print("Input X and Y");x,y = [int(x) for x in input().split()]
# hasil = 2 * x + y*5
# print("Print hasil :",hasil)
# #Case 3
# print("Input a dan t :");a,t = [float(a) for a in input().split()]
# hasilc3 = 0.5 * a * t
# print("Output : ",hasilc3)
# #Case 4
# # Kamus
# a = 1
# b = 4
# # Algoritma
# print("Hasil a yang pertama: "+str(a))
# print("Hasil b yang pertama: "+str(b))
# b = a
# a -= b
# print("Hasil a yang kedua: "+str(a))
# print("Hasil b yang kedua: "+str(b))
# a = b + 1
# b = a / b
# print("Hasil a yang kedua: "+str(a))
# print("Hasil b yang kedua: "+str(b))
#Case 5
awal = input("Masukkan Kecepatan Awal")
waktu =input("Masukan Waktu")
kelajuan = input("Masukkan Kelajuan")
a = (float(kelajuan)-float(awal))/float(waktu)
print("Hasil : ",float(a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment