Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to keep track of your sport running times in python

import datetime

class BoldColors() :

    # Bold
    Black='33[1;30m'       # Black
    Red='33[1;31m' 
    

dt = datetime.datetime.today()
day = dt.day
month = dt.month
year = dt.year

yourTime = input(BoldColors.Red+"Please enter your best time : ")
yourWorstTime = input(BoldColors.Black+"Please enter your worst time : ")
with open('Times.txt', 'a') as f:
    f.writelines(f"{day}/{month}/{year}: best time {yourTime} worst time {yourWorstTime} ")
    f.writelines('

')
Comment

PREVIOUS NEXT
Code Example
Python :: select dropdown lilst item in selenium 4 python 
Python :: Using Python-docx to update cell content of a table 
Python :: add prefix to names in directory python 
Python :: how to convert frame number in seconds python 
Python :: series floor 
Python :: Changing the data type to category 
Python :: Mac: Access your iCloud Documents folder with Jupyter Notebook or JupyterLab 
Python :: assert keyword in python 
Python :: reading csv in spark 
Python :: list comprehensions in python 
Python :: create time array whith np.datetime64 
Python :: how to plot side by side bar horizontal bar graph in python 
Python :: use rectangular signal in python 
Python :: 3d plot 
Python :: python remove last part of string 
Python :: django collectstatic with auto yes 
Python :: append two dfs 
Python :: pydub create empty track 
Python :: ascii to int python 
Python :: add text in figure coordinatesp ython 
Python :: python sum certain postions of array 
Python :: python oneline if statement 
Python :: spacy import doc 
Python :: check if input is pandas dataframe 
Python :: python add column to a matrix 
Python :: matplotlib force scientific notation and define exponent 
Python :: pandas find column with max value for each row 
Python :: python ordered indexs of a list 
Python :: count unique values in python 
Python :: pandas unstring list 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =