예제 #1
0
def main():
  while True:
    user_input = input('Введите номер работника (1,2,3) или q для выхода: ')
    if user_input == 'q':
      print('До свидания')
      break
    calculate_salary(get_employees(user_input))
예제 #2
0
def main():
    while True:
        print(datetime.today())
        command = input('Введите команду')
        if command == 's':
            calculate_salary(22)
        if command == 'w':
            get_employees(22)
예제 #3
0
def task():
    calculate_salary()
    get_employees()
    print('-'*50)
    print('Looks like everything is fine')
    print('It was test.py')
    print('-'*50)
    print('-'*50)
    return
예제 #4
0
def main():
    print('1 - показать список сотрудников')
    print('2 - показать суммарную ЗП')
    while True:
        user_input = input()
        if user_input == '1':
            get_employees()
        elif user_input == '2':
            calculate_salary()
예제 #5
0
def run_program():
    while True:
        desicion = input('Do you want to start program? Input Yes or No ')
        if desicion.lower() == 'yes':
            print(f'Today is {datetime.now()}')
            employees_dict = get_employees()
            with open('application//db//employees.json', 'w',
                      encoding='utf-8') as file:
                json.dump(employees_dict, file, ensure_ascii=False, indent=2)
            calculate_salary(employees_dict)
        else:
            break
예제 #6
0
    def __init__(self, name):
        self.name = name

        get_emp = get_employees()
        for get_name in get_emp.values():
            if name in get_name["name"]:
                salary_per_day = get_name['salary']
                num_salary = calculate_salary(salary_per_day)
                d = datetime.today().strftime('%d/%m/%Y')
                print("Зaрплата сотрудника равна", num_salary, "руб.", d)
            else:
                print("Wrong name")
예제 #7
0
def menu():
    startup_text = '''\n"Бухгалтерия 1.0"
    1 - запросить список активных сотрудников
    2 - рассчитать объём выплат за текущий период
    3 - Завершить работу программы
    Выберите действие: '''

    while True:
        command = input(startup_text)
        if command == '1':
            print(f'\nТекущая дата: {datetime.now().year}.{datetime.now().month}.{datetime.now().day}')
            get_employees()
        elif command == '2':
            print(f'\nТекущая дата: {datetime.now().year}.{datetime.now().month}.{datetime.now().day}')
            calculate_salary()
        elif command == '3':
            print('\nЗавершение работы...')
            break
        else:
            print('Команда не распознана. Пожалуйста, повторите ввод.')
        input('Для продолжения нажмите Enter...')
        print("\n" * 50)
예제 #8
0
def main_menu():
    d = datetime.now()
    dn = d.strftime('%x %X')
    print(f'На {dn} можно узнать:')
    print('Список сотрудников нажмите С \nСписок годовых зарплат нажмите S \n'
          'Общий список нажмите O \nДля выхода нажмите Q')
    while True:
        user_input = input('Введите команду:')
        if user_input == 'c':
            print(get_employees())
        elif user_input == 's':
            print(calculate_salary())
        elif user_input == 'o':
            print(main_salary())
        elif user_input == 'q':
            print('Bye, bye!')
            break
예제 #9
0
import datetime
from application import salary
from application.db import people

if __name__ == '__main__':
    print(datetime.date.today())
    print(salary.calculate_salary())
    print(people.get_employees())
예제 #10
0
파일: main.py 프로젝트: shumbi/AdvPY---HW1
def main():
    datetime.now()
    calculate_salary()
    get_employees()
예제 #11
0
import application.salary as s
import db.people as p

if __name__ == '__main__':
    s.calculate_salary()
    p.get_employees()
예제 #12
0
def main():
    if __name__ == '__main__':
        calculate_salary()
        get_employees()
예제 #13
0
def main():
    print(f"today: {dt.date(dt.now())}")
    salary.calculate_salary()
    people.get_employees()
예제 #14
0
from application import people, salary

if __name__ == '__main__':
    name1, salary1 = people.get_employees()
    salary.calculate_salary(name1, salary1)
예제 #15
0
from application.salary import calculate_salary

from db.people import get_employees

from datetime import datetime

if __name__ == '__main__':
    list_employees = get_employees()
    print(list_employees)

    salary_Ivan_Ivanov = calculate_salary(150, 180)
    print(f'Salary Ivana Ivanova = {salary_Ivan_Ivanov} rubles')

    print(datetime.now())
예제 #16
0
def run_app():
    print(datetime.now())
    calculate_salary()
    get_employees()
예제 #17
0
파일: main.py 프로젝트: f1redes1re/adpy-12
def salary_1():
    print(salary.calculate_salary())
    a = datetime.datetime.today()
    print(f'Дата и время: {a}\n')
예제 #18
0
from application.salary import calculate_salary
from application.people import get_employees
from datetime import datetime

if __name__ == '__main__':
    print(datetime.now().date())
    print(calculate_salary())
    print(get_employees())
예제 #19
0
def main():
    employee = get_employees()
    may_salary = calculate_salary()
    print(f"Имя сотрудника {employee}")
    print(f"Зарплата {may_salary}")
예제 #20
0
def main():
    msg = calculate_salary()
    print(msg)
    msg1 = people.get_employees()
    print(msg1)
예제 #21
0
from application import salary
from application.db import people

if __name__ == '__main__':
    salary.calculate_salary()
    people.get_employees()
예제 #22
0
from datetime import *
from application.salary import calculate_salary
from application.people import get_employees

if __name__ == '__main__':
    calculate_salary(2, 5)
    get_employees("Виктор")
    today = datetime.today()
    print("{}".format(today.strftime("%Y/%m/%d %H:%M")))
예제 #23
0
파일: main.py 프로젝트: dimka1993kh/AP_HW_1
from application.salary import calculate_salary
from application.db.people import get_employees
from datetime import datetime

if __name__ == '__main__':
    print('Запущено из main')
    calculate_salary = calculate_salary()
    print(calculate_salary)
    get_employees = get_employees()
    print(get_employees)
    print(datetime.now())
예제 #24
0
def main():
    print(datetime.now())
    calculate_salary()
    get_employees()
예제 #25
0
def main():
    time_now = datetime.datetime.now()
    date_now = time_now.strftime("%x")
    print(f"Сегодня хороший день {date_now}")
    calculate_salary()
    get_employees()
예제 #26
0
from application.salary import calculate_salary
from db.people import get_employees
from datetime import datetime, date, time

print(datetime.now())

if __name__ == '__main__':
    print(calculate_salary(12))
    print(get_employees(2))
예제 #27
0
from application.db.people import get_employees
from application.salary import calculate_salary
from datetime import date

if __name__ == '__main__':
    print(date.today())
    get_employees()
    calculate_salary()
예제 #28
0
def budget():
    budget_salary = (salary.calculate_salary() * people.get_employees())
    return budget_salary
예제 #29
0
def main_salary():
    a = get_employees()
    b = calculate_salary()
    return a, b
예제 #30
0
def main():
    for employe in get_employees():
        calculate_salary(employe)