The PYTHON_IF statement. Learn python the hard way_ extension exercise. Exercise 29

Source: Internet
Author: User

#coding =utf-8
The data for the #raw_input () function output is "str", which needs to be processed into data, using the Int () function to convert "str" to data for processing
Students = Int (raw_input ("Students number")
Fees_per_person = 80
Cost = students * 3
Total_income = students * Fees_per_person
Total_profit = Total_income-cost

Print "Our total_income is:%d."% Total_income
Print "Our Total_profit is:%d."% Total_profit

If Total_profit > 1000:
Print "\twe is making big money now."

If Total_profit > 5000:
Print "\twe is making super money now."

If Total_profit <= 10000:
Print "\twe still need to work harder.

If Total_profit >= 10000:
print "We don t need to work for the rest of the life."

The PYTHON_IF statement. Learn python the hard way_ extension exercise. Exercise 29

Related Article

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.