Guest User

Untitled

a guest
Dec 12th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "def 吳寶春給我錢(start_salary,year,rate=8):\n",
  10. " now_salary=start_salary*pow(1+rate/100,year*4)\n",
  11. " print('我在吳寶春高雄店工作{}年了,起薪{}元,每3個月調薪{}%,現在月薪是{}元'\n",
  12. " .format(year,start_salary,rate,round(now_salary)))"
  13. ]
  14. },
  15. {
  16. "cell_type": "code",
  17. "execution_count": 2,
  18. "metadata": {},
  19. "outputs": [
  20. {
  21. "name": "stdout",
  22. "output_type": "stream",
  23. "text": [
  24. "我在吳寶春高雄店工作5年了,起薪26000元,每3個月調薪8%,現在月薪是121185元\n"
  25. ]
  26. }
  27. ],
  28. "source": [
  29. "吳寶春給我錢(26000,5)"
  30. ]
  31. },
  32. {
  33. "cell_type": "code",
  34. "execution_count": 3,
  35. "metadata": {},
  36. "outputs": [
  37. {
  38. "name": "stdout",
  39. "output_type": "stream",
  40. "text": [
  41. "我在吳寶春高雄店工作8年了,起薪28000元,每3個月調薪20%,現在月薪是9571013元\n"
  42. ]
  43. }
  44. ],
  45. "source": [
  46. "吳寶春給我錢(28000,8,20)"
  47. ]
  48. }
  49. ],
  50. "metadata": {
  51. "kernelspec": {
  52. "display_name": "Python 3",
  53. "language": "python",
  54. "name": "python3"
  55. },
  56. "language_info": {
  57. "codemirror_mode": {
  58. "name": "ipython",
  59. "version": 3
  60. },
  61. "file_extension": ".py",
  62. "mimetype": "text/x-python",
  63. "name": "python",
  64. "nbconvert_exporter": "python",
  65. "pygments_lexer": "ipython3",
  66. "version": "3.6.7"
  67. }
  68. },
  69. "nbformat": 4,
  70. "nbformat_minor": 2
  71. }
Add Comment
Please, Sign In to add comment