Home > other >  On December 24, python programming, we come to one unit, can you? We take a look at
On December 24, python programming, we come to one unit, can you? We take a look at

Time:12-25

Please answer in this document, a name to the document name: after completion of answer enquiries + name,
The documents submitted to room assignments section: yi - 19 computer 2 class - the final inspection documents (10)
A, Jane a
There are several kinds of types 1, Python combination? And respectively, for example, (10)





2, a brief introduction to the 3 big features of Python object-oriented, (10)






Two, programming (after each of the blanks with the code and execution result screenshot)
1, with a list of print the following format: (15 points)


2, write a program, a random 8 digits, letters (either case) authentication code (15 points)





Three discusses (your own organization language, there is no standard answer)
1, this semester is over, please combined with the conditions of their own learning about themselves and have the most impressive or up to a point (a chapter or a knowledge or a title can be), and talk about their own learning and harvest, also can write a written plans for the subsequent course of study and the suggestion, not less than 200 words, (40)

CodePudding user response:

1
Question 1:
Answer: (1). List types: person=[' aab ', '19', '20']
(2). A tuple type: a tuple=()
(3). The dictionary types: tel={' aab ', '321', ZBZ: '681'}
(4). Collection types: s=set ([5,4,3,2,1]) s={5,4,3,2,1}

Question 2:
Answer: the three major characteristics of object-oriented refers to: encapsulation, inheritance and polymorphism,
(1). Packaging, just as its name implies is to package content to a certain place, later to call is encapsulated in somewhere, the content of the
So, when using object-oriented encapsulation features, need:
? The content packaging to somewhere
? The content of the call from somewhere is encapsulated
(2). Inheritance, and inheritance of object-oriented and inherit the same in real life, i.e., the son can inherit his father's content,
For example: the cat can: mews, eat, drink, pull,
Dogs can: bark, eat, drink, pull,
(3). The so-called polymorphic: definition of the different types and runtime, at this time as polymorphism, polymorphism refers to the kind of things have a variety of forms, (an abstract class with multiple subclasses, and thus the concept of polymorphic relies on the inheritance),

2
Question 1:


Question 2:


The third topic
Answer: time flies by, twinkling of an eye, at the final stage, here, I want to express my feeling of the language, and many other languages like python relative to Java is a simple little, every time I am a bit confused when you take a look at the python to solve the plight of my heart, I always knock on the code, practice typing speed,
May my programming is not so bad, but I will still try hard to learn, such as a random number, the began to make I groped for a period of time, later I found so much actually,
Such as the following code:
 
Import the random
Num=random. Randint (1100)
For I in range (1100) :
A=int (input (" please input your number: "))
If a> Num:
Print (" you guess ")
Elif aPrint (" oh, you guess small ")
The else:
Print (" congratulations congratulations, right ")

This is a simple guess Numbers game, I found the secret or a little more, but still not so many, there is an import random import random number of bags, must guide package, to use, and to a lot of python bags to be imported, the key is to see oneself is how to use these bags, these nouns, such as the what if the else of this kind of usage, I began to feel really good hard, maybe that is because I didn't knock code, then I found that is so simple,
For later, harvest a lot, I feel like I'm on the later development is better, I know programming road a long way to go, do not worry, everything will slowly, must have perseverance of perseverance and faith, otherwise, it is hard to do something great
Later I don't know what will not be following the path of the programmer, but I know now that doing one thing, have to give it to be, otherwise it will be very sorry myself, cheer for your future self, I will also try to go down,

  • Related