Skip to content

This repository contains a collection of Python scripts designed to perform various useful tasks. These scripts cover a range of functionalities, from time and date manipulation to random response generation and more.

Notifications You must be signed in to change notification settings

MuzafarovMirfayz/8.03.2023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Time Class

The time class is defined to handle time-related operations. It takes a time string in the format "HH:MM:SS" as input during initialization. It parses the input time string, validates it, and stores the hours, minutes, and seconds as separate attributes. It includes methods to increment hours, minutes, and seconds by 5 units. The tek method formats the time as "HH:MM:SS" and prints it. This class provides basic time manipulation functionality.

Zodiac Function

The zodiac function takes a date string in the format "DD.MM" as input. It validates the input to ensure the day and month are within appropriate ranges. Based on the date, it determines the Zodiac sign associated with that date and prints it. The function handles each month's date ranges and Zodiac signs.

Microbe Time Conversion

The Mikrob function is designed to convert a given number (n) into a microbe's time format. It calculates how many doublings (doim), minutes, hours, and days are needed to reach or exceed the given number. It formats and prints the result in the format "D-days H-hours M-minutes." The script offers a collection of functions that can be used independently for various time and date-related tasks. It demonstrates basic input validation and date-to-Zodiac sign conversion while also providing a unique microbe time format conversion.

Sana Function

The sana function calculates the difference in days between two given dates. It takes two date lists, sana1 and sana2, as input and prints the absolute difference in days. The function uses the date class from the datetime module to perform the date calculations.

Shar Function

The shar function generates random answers to a question. It takes a question as input (although it is defined with self, it doesn't use it) and prints a random answer from a predefined list of possible answers. harf_raqam Function

The harf_raqam function converts letters in names to their corresponding numeric values. It takes two names as input, converts each letter in the names to its numeric value, and then prints the sum of the numeric values of the letters in both names.

Calendar Function

The script reads a date in the format "YYYY-MM" from the user. It then uses the calendar module to print the calendar for the specified month and year.

About

This repository contains a collection of Python scripts designed to perform various useful tasks. These scripts cover a range of functionalities, from time and date manipulation to random response generation and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages