••••i am trying to build a clock using python where the clock is about 1/2 an earth second, it would have 11 seconds in a minute, it would have 5 minutes in an hour, and it would have 3 hours in a day. it would also have 3 months per year, each month would be 5, 3 and 4 days respectively. And its current year now is 9977. it would have 2 modes, a fast mode and a regular mode.
I need to know how to start this, how to defined the variables and functions.
Can anyone please help.

You can use the time library using import time.
You are going to want to use something along the lines of time.sleep(Seconds)

I don't really understand what you are talking about with a hour being 5 minutes in a hour and 11 seconds in a minute.

Think first. Think about what you said. And put into the code. Simple... Ok, I'm actually going to give you a hand. So you want, 11 seconds in a minute, 5 minutes in an hour, 3 hours in a day and 3 months per year, and I don't know what you mean by, "each month would be 5, 3 and 4 days respectively". Anyway, now you obviously read what tbone2sk said, and you obviously already know that time.sleep counts in seconds. So, lets do a bit of maths revision:

oneMinute = 11 seconds
oneHour = 60(One Minute) * 5 = 300 seconds
oneDay = 300(One Hour) * 3 = 900 seconds
oneMonth = 900(One Day) * 30 = 27000 seconds
threeMonths = 27000(One Month) * 3 = 81000 seconds

This looks well complicated, and well it is complicated, why? Why is it so complicated? Why do you need it for? Anyway. I basically gave you the answer, at least I tried. Nevertheless, I am in a good mood, so lets do it together. First you have to import the module/library (import time), then you basically need to put my calculations variables. For example:

import time
oneMinute = time.sleep(11)

And that's basically it. You get what I mean, well I probably did not answer what you were looking for, but that's because you could be a little bit more precise, but at least I might give a new idea, for what ever weird thing you're doing. I will be happy in helping you, if the answer that I gave you, was the kind of answer that did not help you. Hope it helps, and good luck, because you will need. Dan08

I bet he's making a game which takes place on a different planet :D

i think is what he meant was instead of months being 30,28, and 31, he replaces with 5, 4 qand 3 on respective months

import time
def onesecond():


def oneminute():
while minc<11:
print("Second: "+str(minc))

def onehour():
while minh<5:
print("Minute: "+str(minh))

def oneday():
while mind<3:
print("Day: "+str(mind))
def onemonth():
while minm<4:
print("Month: "+str(minm))
def oneyear():
while miny<3:
print("Year: "+str(miny))


I think you are after more like this, just change in your own units and take out jump from midnight to next morning 5 o'clock if you want. Two speeds of advancing the time you can best deal by multiple increases of time per clock tick, in this code the advance is one hour per tick.

Re: Managing Date and Time change in text adventure