Python3 Download and Exercise 1

Source: Internet
Author: User

Download Python:

https://www.python.org/downloads/release/python-365/

Download the Python Community Edition (Community

Https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows&code=PCC

9365437

1. Programming to achieve 9*9 multiplication formulas

# 99 Multiplication of rectangles
For I in Range (1,10):
For j in Range (1,10):
Print ("%d*%d=%2d"% (i, J, I*j), end= "")
Print ("")


2. There are 1.3 billion people in our country. Annual growth rate of 0.8%, over 4 billion years

I=1
A=13
While a<40:
a=a* (1.008)
I=i+1
If a >=40:
Break
Print (i)


3. Programmed to calculate the average score for a class of 100 students and then count the number of people above the average


Count = 5
s = []
For I in range (count):
Print (i+1)
Name = input (' Name: ')
Score = input (' Score: ')
t = {}
t[' name '] = Name
t[' score ' = Int (score)
s + = [T]


#max = 0
#min = 0
All=0
sum = 0
For I in range (count):
Sum + = s[i][' score ']
a = Int (sum/count)
Print (a)

For I in range (count):

If a < s[i][' score ']:
all = all + 1
# if min > s[i][' score '):
# min = i
# sum +=s[i][' score ')
#print (' max: ' + s[max][' name '] + ' + str (s[max][' score '))
#print (' min: ' + s[min][' name '] + ' + str (s[min][' score '))
Print (' total: ' + str (all))

Python3 Download and Exercise 1

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.