#!/usr/bin/python
# -*- coding: UTF-8 -*- i = int(raw_input(' Net profit :'))
arr = [1000000,600000,400000,200000,100000,0]
rat = [0.01,0.015,0.03,0.05,0.075,0.1]
r = 0
for idx in range(0,6):
if i>arr[idx]:
r+=(i-arr[idx])*rat[idx]
print (i-arr[idx])*rat[idx]
i=arr[idx]
print r

python practice 10 More articles about

  1. Ten . Python Basics (10)-- Decorator

    Ten . Python Basics (10)-- Decorator 1 ● Decorator A decorator is a function that take a function as an argument and retur ...

  2. Quick start : Ten minutes to learn PythonTutorial - Learn Python in 10 minutes

    This tutorial is available as a short ebook. The e-book features extra content from follow-up posts ...

  3. 『Python Basics -10』 Dictionaries

    # 『Python Basics -10』 Dictionaries Catalog : 1. Dictionary basic concepts 2. Dictionary key (key) Characteristics of 3. Dictionary creation 4-7. Look up the dictionary 8. Ergodic dictionary 1. The basic concepts of dictionaries Dictionary is a kind of key - value Of ...

  4. python Advanced 10 MySQL Add code 、 Alias 、 View 、 Database modification

    python Advanced 10 MySQL Add     code . Alias . View . Database modification One . Coding problem #MySQL Level code # Change location : /etc/mysql/mysql.conf.d/mysqld.cnf def ...

  5. python Study 10— iterator 、 Ternary expressions and generators

    python Study 10— iterator . Ternary expressions and generators 1. iterator protocol Definition : Object must provide a next Method , Execute the method or return to the next item in the iteration , Or go back to one StopIteration abnormal , To terminate the iteration ( Only to ...

  6. Python 3.10 The version adopted the first PEP, Chinese translation is coming soon

    Distance now Python 3.9.0 And the final version of 3 Months , The official timeline is : 3.9.0 beta 4: Monday, 2020-06-29 3.9.0 beta 5: Monday, 202 ...

  7. Python 3.10 The first of PEP Be born , Built in type zip() Usher in new features

    Foreword of translator : Believe that anyone who has used zip() People with built-in functions , Will agree that it's useful , however , Its biggest problem is that it can produce unexpected results .PEP-618 We propose to add a parameter to it , Can effectively solve everyone's pain point . This is a Python ...

  8. Python 3.10 It will be released next year , See what's new ?

    We are living in Python 3.8 The age of stability , It was released last week Python The latest stable version of 3.8.4.Python 3.9 Already in its development beta Stage , also 2020 year 7 month 3 It's released in advance beta edition (3.9.0b ...

  9. Python 3.10 New functions and changes in

    With the last alpha The release of ,Python 3.10 The functional changes of the company have been fully finalized ! Now? , It's the experience Python 3.10 Ideal time for new features ! As the title says , This article will share with you Python 3.10 All of the important functions in ...

  10. Think Python - Chapter 10 - Lists

    10.1 A list is a sequenceLike a string, a list is a sequence of values. In a string, the values are ...

Random recommendation

  1. putty Can't connect linxu, newspaper :connection refused

    use putty Connect the new centos6.5, There is connection refused problem , Post reference http://blog.sina.com.cn/s/blog_60d2d62a0100tq2l.htm ...

  2. css Set the style

    The front desk div <div id="DIV1" runat="server" > </div> backstage : this.DIV1.Style.Val ...

  3. Razor stay JS Embed background variables in

    HTML Define global variables in @{ int CurrentUserId =ViewBag.CurrentUserId; } JS How to choose the value in var CurrentUserId = parseInt(@Htm ...

  4. django The second project -- Use templates

    First step : Create a new project secondproject cd /tmp/django-admin startproject secondeproject The second step : Create a folder for placing templates cd /tmp/ ...

  5. The source code to achieve --&gt; strcpy

    Copy string to target string function char *strcpy(char *strDestination, const char *strSource); Copy source string strSource To the target string strDestin ...

  6. The app wants to chat - Chuangwen 4C Team coaching experience ( One )

    Today, I rarely participated in the 4C Team coaching courses From : http://www.cccoach.cn/Home/Activity/show/id/449.html The whole course revolves around Common ...

  7. C# stay while In circulation new The object of

    One : ask : Then every cycle will be new One A? The memory will be full ? It's better to put the action of this initialization object outside the loop ? while(true) { A a = new A(); ... sleep(100 ...

  8. lvs Infrastructure and deployment

    LVS brief introduction LVS--Linux Vritual Server namely linux Virtual server ,1998 year 5 This month was developed by Dr. Zhang wensong and open source , At present, enterprises in many countries around the world are using LVS Building cluster services . LVS It's true ...

  9. stay SpringBoot2.0 And Spring 5.0 WebMvcConfigurerAdapter It has been abandoned , There are two ways to find solutions right now

    1 Direct realization WebMvcConfigurer ( The official recommendation ) for example : @Configuration public class WebMvcConfg implements WebMvcConfigure ...

  10. mui.ajax() and asp.net sql Server data interaction 【3】 The final version

    1. Front page <header class="mui-bar mui-bar-nav"> <a class="mui-action-back mui-ic ...