0
0 комментариев

[apcode language=»python»]

print('if you want to know how much hours minutes and seconds in some seconds, press 1\n')
v=int(input())
while v==1:
 print('how many seconds?\n')
 s=int(input())
 h=s//3600
 m=s%3600//60
 s1=s%3600%60
 if h>=24:
  while h>=24:
    d=h//24
    h=h%24
  if d>=365:
    while d>365:  
      y=d//365
      d=d%365
      if d<365:
          print('years',y,'days',d,'hours ',h,'minutes',m,'seconds',s1)
          print('again?' )
          j=input()
          if j=='yes' or j=='2':
           v=1
          else:
           v=0
           elif h<24:
          print('days',d,'hours ',h,'minutes',m,'seconds',s1)
          print('again?' )
          j=input()
          if j=='yes' or j=='2':
           v=1
          else:
           v=0
      else:   
  print('hours',h,'minutes',m,'seconds',s1)
  print('again?' )
  j=input()
  if j=='yes' or j=='2':
       v=1
  else:
       print('thank you for using my program!')
       v=0

[/apcode]


Добавить комментарий