-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAcronyms.py
More file actions
31 lines (28 loc) · 905 Bytes
/
Acronyms.py
File metadata and controls
31 lines (28 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
user_input=str(input("enter the phase:"))
text=user_input.split()
a=" "
for i in text:
a=a+str(i[0]).upper()
print(a)
import datetime
alarm_time=input("Put the time of alarm to be set: HH:MM:SS")
alarm_hour=alarm_time[0:2]
alarm_minute=alarm_time[3:5]
alarm_second=alarm_time[6:8]
alarm_period=alarm_time[9:11].upper()
print("Setting up alarm........")
while True:
now=datetime.datetime.now()
current_hour=now.strftime("%I")
current_minute=now.strftime("%M")
current_second=now.strftime("%S")
current_period=now.strftime("%p")
if alarm_period==current_period:
if alarm_hour==current_hour:
if alarm_minute==current_minute:
if alarm_second==current_second:
print("Wake up....")
break
# Program to find the ASCII value of the given character
c = 'p'
print("The ASCII value of '" + c + "' is", ord(c))