def main(): while True: user_input = input('Введите номер работника (1,2,3) или q для выхода: ') if user_input == 'q': print('До свидания') break calculate_salary(get_employees(user_input))
def main(): while True: print(datetime.today()) command = input('Введите команду') if command == 's': calculate_salary(22) if command == 'w': get_employees(22)
def task(): calculate_salary() get_employees() print('-'*50) print('Looks like everything is fine') print('It was test.py') print('-'*50) print('-'*50) return
def main(): print('1 - показать список сотрудников') print('2 - показать суммарную ЗП') while True: user_input = input() if user_input == '1': get_employees() elif user_input == '2': calculate_salary()
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
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")
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)
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
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())
def main(): datetime.now() calculate_salary() get_employees()
import application.salary as s import db.people as p if __name__ == '__main__': s.calculate_salary() p.get_employees()
def main(): if __name__ == '__main__': calculate_salary() get_employees()
def main(): print(f"today: {dt.date(dt.now())}") salary.calculate_salary() people.get_employees()
from application import people, salary if __name__ == '__main__': name1, salary1 = people.get_employees() salary.calculate_salary(name1, salary1)
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())
def run_app(): print(datetime.now()) calculate_salary() get_employees()
def salary_1(): print(salary.calculate_salary()) a = datetime.datetime.today() print(f'Дата и время: {a}\n')
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())
def main(): employee = get_employees() may_salary = calculate_salary() print(f"Имя сотрудника {employee}") print(f"Зарплата {may_salary}")
def main(): msg = calculate_salary() print(msg) msg1 = people.get_employees() print(msg1)
from application import salary from application.db import people if __name__ == '__main__': salary.calculate_salary() people.get_employees()
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")))
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())
def main(): print(datetime.now()) calculate_salary() get_employees()
def main(): time_now = datetime.datetime.now() date_now = time_now.strftime("%x") print(f"Сегодня хороший день {date_now}") calculate_salary() get_employees()
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))
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()
def budget(): budget_salary = (salary.calculate_salary() * people.get_employees()) return budget_salary
def main_salary(): a = get_employees() b = calculate_salary() return a, b
def main(): for employe in get_employees(): calculate_salary(employe)