Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {},
- "outputs": [],
- "source": [
- "def 吳寶春給我錢(start_salary,year,rate=8):\n",
- " now_salary=start_salary*pow(1+rate/100,year*4)\n",
- " print('我在吳寶春高雄店工作{}年了,起薪{}元,每3個月調薪{}%,現在月薪是{}元'\n",
- " .format(year,start_salary,rate,round(now_salary)))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "我在吳寶春高雄店工作5年了,起薪26000元,每3個月調薪8%,現在月薪是121185元\n"
- ]
- }
- ],
- "source": [
- "吳寶春給我錢(26000,5)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "我在吳寶春高雄店工作8年了,起薪28000元,每3個月調薪20%,現在月薪是9571013元\n"
- ]
- }
- ],
- "source": [
- "吳寶春給我錢(28000,8,20)"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.6.7"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Add Comment
Please, Sign In to add comment