Zhejiang University Python PTA After-Class Exercises Blog Record Complete Solutions (Python)



Advance

These more than 90 questions are all done by me in school within a week.
Basically, they are all independently thought from the beginning of the first question to the end of the last question. They
are all coders with zero knowledge of Python,
so I write here too. A blog

I also hope that it can
be helpful to some friends who are still learning or have no foundation :)

Insert picture description here



Exercise blog link

Chapter One

Chapter 1-1 keyboard input from two numbers, and seeking and their outputs (30)
Chapter 1-2 keyboard input to the three numbers a, b, c, the output value according to the formula (30 minutes)
of Chapter 1-3 Output "Life is short, I learn Python" (10 points)


Chapter two

Chapter 2-1 Calculate 11+12+13+…+m (30 points)
Chapter 2-2 Calculate the piecewise function [1] (10 points)
Chapter 2-3 Tiered electricity price (15 points)
Chapter 2- 4 Special a-series summation (20 points)
Chapter 2-5 Find the sum of the first N terms in odd-numbered fractional sequence (15 points)
Chapter 2-6 Find the sum of the first N terms in the interleaved sequence (15 points)
Chapter 2- 7 Generate the same n-digit number for each digit (30 points)
Chapter 2-8 Conversion function use (30 points)
Chapter 2-9 Comparing sizes (10 points)
Chapter 2-10 Output Fahrenheit-Celsius temperature conversion table ( 15 points)
Chapter 2-11 Find the partial sum of the square and reciprocal sequence (15 points)
Chapter 2-12 Output the area and perimeter of the triangle (15 points)
Chapter 2-13 Calculate the residential water fee by sections (10 points)
Chapter 2-14 Finding the sum of integer segments (15 points)


third chapter

Chapter 3-1 is greater than the average value of height (10 points)
Chapter 3-2 Checking the ID card (15 points)
Chapter 3-3 The position index of the output letter in the string (20 points)
Chapter 3-4 Find the designation Characters (15 points)
Chapter 3-5 Character conversion (15 points)
Chapter 3-6 Find the most frequent number in an integer sequence (15 points)
Chapter 3-7 Find the maximum value and its subscript (20 points)
Chapter 3-8 Reverse order of strings (15 points)
Chapter 3-9 Converting strings to decimal integers (15 points)
Chapter 3-10 Statistics of uppercase consonants (15 points)
Chapter 3-11 Sorting strings (20 min)
Chapter seeking an integer of 3-12 and the number of bits of the sum of the digits (15 minutes)
Chapter 3-13 string replacement (15 minutes)
Chapter 3-14 capitalization string conversion (15 min)
3 Chapter-15 Count the number of words in a line of text (15 points)
Chapter 3-16 Delete duplicate characters (20 points)
Chapter 3-17 Delete characters (30 points)
Chapter 3-18 Output 10 unique English letters (30 points)
Chapter 3-19 Find the longest string (15 points)
Chapter 3-20 Three digits in reverse order (10 points)
Chapter 3-21 Judging palindrome strings (15 points)
Chapter 3 -22 Output uppercase English letters (15 points)


Chapter Four

Chapter 4-1 Generating a power table of 3 (15 points)
Chapter 4-2 Counting prime numbers and summing (20 points)
Chapter 4-3 Monkey eating peach problem (15 points)
Chapter 4-4 Verifying "Brother" Debach conjecture" (20 points)
Chapter 4-5 Approximate value of e (15 points)
Chapter 4-6 Output the first n Fibonacci numbers (15 points)
Chapter 4-7 Count the average score and the number of passing students (15 min)
Chapter 4 -8 before seeking fractional N sequences and (15 points)
Chapter 4-9 query fruit prices (15 minutes)
Chapter 4-10 and least common multiple of the greatest common divisor (15 minutes)
Chapter 4-11 Judgment of prime numbers (20 points)
Chapter 4-12 Find the Fibonacci number that satisfies the conditions (30 points)
Chapter 4-13 Find the approximate value of e with an error less than the input value (20 points)
Chapter 4-14 Statistical characters ( 15 points)
Chapter 4-15 Exchange coins (20 points)
Chapter 4-16 jmu-python- determine whether a triangle is formed (10 points)
Chapter 4-17 Number of daffodils (20 points)
Chapter 4-18 Monkey selection King (20 points)
Chapter 4-19 Matrix operations (20 points)
Chapter 4-20 Find the sum of the elements of the matrix (15 points)
Chapter 4-21 Judging the upper triangular matrix (15 points)
Chapter 4-22 Find Saddle point (20 points)
Chapter 4-23 Find the local maximum of a matrix (15 points)
Chapter 4-24 Print the nine-nine formula table (15 points)
Chapter 4-25 Output Triangular Character Array (15 points)
Chapter 4 -26 Find 1!+3!+5!+……+n! (10 points)
Chapter 4-27 The maximum value of each row in a two-dimensional array Sum of each row (10 points)
Chapter 4-28 Matrix transposition (10 points)
Chapter 4-29 Finding out elements that are not common to two arrays (20 points)
Chapter 4-30 Finding the number (20 points)


chapter Five

Chapter 5-1 Output week name abbreviations (70 points)
Chapter 5-2 Dictionary representation of graphs (20 points)
Chapter 5-3 Four arithmetic operations (implemented with a dictionary) (30 points)
Chapter 5-4 Analysis activity voting Situation (20 points)
Chapter 5-5 Count the number of character appearances (20 points)
Chapter 5-6 Statistic years of service (20 points)
Chapter 5-7 List de-duplication (40 points)
Chapter 5-8 can be 3, Number of numbers divisible by 5 and 7 (30 points)
Chapter 5-9 Find the number of matrix saddle points (30 points)
Chapter 5-10 Sum of two numbers (30 points)
Chapter 5-11 Dictionary merge (40 Minute)


Chapter Six

Chapter 6-1 Enter the list and find the sum of the list elements (10 points)
Chapter 6-2 A bunch of one (15 points)
Chapter 6-3 The sum of the numeric elements of a list or tuple (20 points)
Chapter 6- 4 Weighted sum of list elements (1) (40 points)
Chapter 6-5 Weighted sum of list elements (1) (40 points)
Chapter 6-6 Finding the number of elements at a specified level (40 points)
Chapter 6 Chapter -7 Find the student with the highest total score (15 points)
Chapter 6-8 Output all sorts (20 points)


Chapter 6 Function Problems

Chapter 6 Functions-1 Use functions to find special a series sums (10 points)
Chapter 6 Functions-2 Use functions to find prime sums (20 points)
Chapter 6 Functions-3 Use functions to count the number of specified numbers (20 points) )
Chapter 6 Functions-4 Use the function to output the number of Fibonacci numbers in the specified range (20 points)
Chapter 6 Functions-5 Use functions to approximate the cosine function (20 points)
Chapter 6 Functions-6 Abbreviations (20 points) )


Chapter VII

Chapter 7-1 Word Frequency Statistics (30 points)


End to spread flowers

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_37500516/article/details/114486069