Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hasenpfote committed Jan 10, 2023
1 parent a1edb1a commit cd4dacc
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 7 deletions.
7 changes: 0 additions & 7 deletions .github/temp.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import platform
import sys
import time


def add(a, b):
'''Adds two numbers.
Args:
a: The value of the left-hand side.
b: The value of the right-hand side.
Returns
The resulting value.
'''
return a + b


def sub(a, b):
'''Subtracts two numbers.
Args:
a: The value of the left-hand side.
b: The value of the right-hand side.
Returns
The resulting value.
'''
return a - b


def mul(a, b):
'''Multiplies two numbers.
Args:
a: The value of the left-hand side.
b: The value of the right-hand side.
Returns
The resulting value.
'''
return a * b


def div(a, b):
'''Divides two numbers.
Args:
a: The value of the left-hand side.
b: The value of the right-hand side.
Returns
The resulting value.
'''
return a / b


def muladd(a, b, c):
'''Performs the fused multiply-add operation.'''
return a * b + c


def print_greet():
'''Displays greeting.'''
print('Hello, world!')


def print_mascot():
'''Displays mascot.'''
runner_os = platform.system()
if runner_os == 'Linux':
print('Tux')
elif runner_os == 'Darwin':
print('Dogcow')
else:
print('Unknown')


def is_py38_or_higher():
'''Check if python 3.8 or higher.'''
if sys.version_info < (3, 8):
return False
else:
return True


def print_python_version():
'''Displays python version.'''
# print(f"{sys.version=}") # Syntax for Python 3.8 or higher.
# print(f"sys.version={sys.version}")
print(sys.version)


def print_with_delay(text):
delay = len(text) / 100 + 1.0
time.sleep(delay)
print(text)


if __name__ == '__main__':
print_greet()

0 comments on commit cd4dacc

Please sign in to comment.