kakak", ini aku baru belajar python ni, dikasi tugas beginian gimana ya

Oleh ericjovian 0 0 pada Selasa, 18 Sep. 2018, 15:44:04


Kembali ke forum umum


Petunjuk Diskusi
Silahkan masuk untuk berdiskusi



A​ ​person​ ​is​ ​driving​ ​from​ ​town​ ​A​ ​to​ ​town​ ​B.
​ Make​ ​a​ ​program​ ​that​ ​can simulate​ ​his​ ​travel​ ​from​ ​A​ ​to​ ​B. 
 IMPORTANT​ ​VARIABLES: 
Initial​ ​Velocity​ ​=​ ​Constant​ ​0​ ​m/s 
Time​ ​spent​ ​on​ ​the​ ​road​ ​=​ ​user​ ​input​ ​(s) 
Acceleration​ ​=​ ​user​ ​input​ ​(m/s2) Distance​ ​=​ ​user​ ​input​ ​(m) 
Speed​ ​Limit​ ​=​ ​Constant​ ​60​ ​m/s 
 SAMPLE​ ​INPUT: Time​ ​spent​ ​on​ ​the​ ​road​ ​=​ ​10  
Acceleration​ ​=​ ​4 
Distance​ ​=​ ​500 
 SAMPLE​ ​OUTPUT:​
 ​(The​ ​*​ ​indicates​ ​every​ ​10m) 
Duration:​ ​0​ ​Distance: 
Duration:​ ​1​ ​Distance: 
Duration:​ ​2​ ​Distance: 
Duration:​ ​3​ ​Distance:​ ​* 
Duration:​ ​4​ ​Distance:​ ​***
 Duration:​ ​5​ ​Distance:​ ​*****
 Duration:​ ​6​ ​Distance:​ ​******* Duration:​ ​7​ ​Distance:​ ​********* Duration:​ ​8​ ​Distance:​ ​************ Duration:​ ​9​ ​Distance:​ ​**************** Duration:​ ​10​ ​Distance:​ ​******************** 
 IF​ ​OVER​ ​SPEED​ ​LIMIT​ ​OUTPUT: The​ ​person​ ​went​ ​over​ ​the​ ​speed​ ​limit.​ ​(Max​ ​speed​ ​was​ ​__​ ​m/s) ELSE​ ​OUTPUT: The​ ​person​ ​did​ ​not​ ​go​ ​over​ ​the​ ​speed​ ​limit.​ ​(Max​ ​speed​ ​was​ ​__​ ​m/s) 
0 jempol


Belum ada tanggapan