Skip to content
Sign upLog in
← Back to Community
can some help me to write this code ? my question is to write a code countdown till midnight!
Profile icon
ABEDALKADER

can some help me to write code countdown till midnight!!

Voters
Profile icon
SneakyEel
Profile icon
ABEDALKADER
Comments
hotnewtop
Profile icon
ABEDALKADER

no answer plz someone help meeeee ??!!!

Profile icon
PattanAhmed

@ABEDALKADER
Hi Abed,
You can try this code and enter the time left for midnight.
Here is the code:-

import time def countdown(t): while t > 0: print(t) t -= 1 time.sleep(1) print("BLAST OFF!") print("How many seconds to count down? Enter an integer:") seconds = input() while not seconds.isdigit(): print("That wasn't an integer! Enter an integer:") seconds = input() seconds = int(seconds) countdown(seconds)

If it didn't work, Then this is an amazing website that I have found. Check it here

Hope this helps
Please mark my answer if this helps

Profile icon
Coder100
Profile icon
ABEDALKADER

Hi

@Coder100

no I ask how to make countdown in python till midnight ? not in java script! I tried to search in the page u get it me from the link to make countdown till midnight in python ? but no answer only to the java script!

Profile icon
Coder100

what's the problem you are having?

Profile icon
ABEDALKADER

u try to help me [email protected]
and I will get u my question and I will get u my code to fix it make countdown till midnight sure in python! but I can`t fix it I make it input u can delete the input and fix it to countdown till midnight in any time I am running the code! :