Python Exercises (i)

Source: Internet
Author: User

1. The bonus awarded by the Enterprise is based on the profit percentage. Profit (I) less than or equal to $100,000, bonus can be raised by 10%; high profit
At $100,000, below $200,000, the portion under $100,000 is 10% commission, higher than $100,000, cocoa
7.5%, 200,000 to 400,000, higher than 200,000 yuan, can be a commission of 5%, 400,000 to 600,000 is higher than
400,000 yuan of the portion, can be 3%, 600,000 to 1 million, higher than 600,000 yuan portion, can be a commission of 1.5%, higher than
1 million yuan, the portion of more than 1 million yuan by 1% Commission, from the keyboard input the month profit I, the total bonus should be issued?

2. An integer, plus 100 is a complete square number, plus 168 is a complete square number, what is the number?

3. # (2017-millet-sentence reversal)


-Title Description:
> Given a sentence (containing only letters and spaces), the word position in the sentence is reversed, the word is separated by a space, there is only one space between the words, and there are no spaces. For example: (1) "Hello Xiao Mi", "Mi xiao Hello"

-Enter a description:
> Input data has multiple groups, one row for each group, including a sentence (sentence length less than 1000 characters)

-Output Description:
> For each test example, it is required to output sentences that are formed after the word reversal in the sentence


-Example 1:

```
-Input
Hello Xiao mi
-Output
Mi Xiao Hello



4. # (2017-Good future-written test programming questions)--list practice

-Title Description:
Enter two strings, removing all the characters from the second string from the first string. For example, enter "they is students." and "Aeiou", the first string after deletion becomes "Thy R stdnts."

-Enter a description:
Each test input consists of 2 strings

-Output Description:
Output the deleted string

-Example 1:

```
Input
They is students.
Aeiou
Output
Thy R stdnts.
```


5. # (2017-NetEase-written test programming questions)-string practice

Small, easy-to-like words have the following characteristics:
1. Words each letter is uppercase
2. Words have no consecutive equal letters
The column may not be contiguous.
For example:
Xiao Yi does not like "ABBA", because there are two consecutive ' B '
Xiao Yi does not like "thetxh", because this contains the subsequence "Thth"
Small easy to Like "A", "ABA" and "ABCBA" these words
Give you a word, you have to answer whether Xiao Yi will like the word.

-Enter a description:
Input is a string consisting of uppercase letters with a length of less than 100

-Output Description:
If small easy to like output "likes", do not like output "dislikes"


Example 1:

```
Input
Aaa
Output
Dislikes

```

Python Exercises (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.