title: Creating Alarm in Python, Problems with input and output
body: <p>Hi I'm new to coding and need some help with an alarm. When running this I am having problems with the output in two areas. The first is &quot;:&quot; between the alarma and alarmb, I am trying to get the format to show (3:29 PM) and it is showing (3 : 29 PM). The second issue is with alarmb anything entered under 10 for input will show without the 0 such as 3 : 1 PM rather than 3 : 01 PM.</p>
  <p>#Alarm clock with sound</p>
  <pre><code>from playsound import playsound
  import time
  import datetime
  import os
  os. system('cls')
  
  
  a = &quot;Good Morning!&quot;
  t = datetime.datetime.now()
  
  alarma = int(input(&quot;What Hour do you want me to wake you up at? &quot;))
  alarmb = int(input(&quot;What Minute do you want me to wake you up at? &quot;))
  alarmc = str(input(&quot;AM or PM &quot;))
  
  os. system('cls')
  
  print(&quot;Alarm set for&quot;,alarma,&quot;:&quot;,alarmb, alarmc)
     os. system('cls')
  
  if(alarmc == &quot;PM&quot;):
       alarma = alarma + 12
  
  while True:
      if(alarma == datetime.datetime.now().hour and
      alarmb == datetime.datetime.now().minute) :
          print(a)
          print(t.strftime(&quot;The time is now %I:%M %p&quot;))
          print(t.strftime(&quot;It is currently %A, %B %d, %Y&quot;))
          playsound(&quot;WakeUp.mp3&quot;)
          break
  </code></pre>