当前位置:网站首页>Class exercises
Class exercises
2022-07-03 17:57:00 【Wild universe PY】
class Attack(object): # Create an attack class
def init(self,cross_cut,pick,thorn):
self.cross_cut=cross_cut
self.pick=pick
self.thorn=thorn
def male_warrior(self):
print("%s, Slash " %(self.cross_cut))
def female_warrior(self):
print("%s, Vertical cantilevered " %(self.pick))
def the_demon(self):
print("%s, Straight stab " %(self.thorn))
ouyang=Attack(“ cut ”,“ pick ”,“ thorn ”)
george=Attack(“ cut ”,“ pick ”,“ thorn ”)
lichangchun=Attack(“ cut ”,“ pick ”,“ thorn ”)
ouyang.male_warrior()
george.female_warrior()
lichangchun.the_demon()

边栏推荐
- Ml (machine learning) softmax function to realize the classification of simple movie categories
- SDNUOJ1015
- 一入“远程”终不悔,几人欢喜几人愁。| 社区征文
- Lesson 13 of the Blue Bridge Cup -- tree array and line segment tree [exercise]
- Research Report on investment trends and development planning of China's thermal insulation material industry, 2022-2028
- Investigation on the operation prospect of the global and Chinese Anti enkephalinase market and analysis report on the investment strategy of the 14th five year plan 2022-2028
- Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028
- Managing multiple selections with MVVM - managing multiple selections with MVVM
- Line by line explanation of yolox source code of anchor free series network (6) -- mixup data enhancement
- Implementation of Tetris in C language
猜你喜欢

聊聊支付流程的設計與實現邏輯

Five problems of database operation in commodity supermarket system

List的stream中Long对象与long判等问题记录

Win32: analyse du fichier dump pour la défaillance du tas
![AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]](/img/3d/6d61fefc62063596221f98999a863b.png)
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]

How to deploy applications on kubernetes cluster

Codeforces Round #803 (Div. 2) C. 3SUM Closure

Implementation of Tetris in C language

模块九作业

Records of long objects and long judgments in the stream of list
随机推荐
[combinatorics] recursive equation (the non-homogeneous part is an exponential function and the bottom is the characteristic root | example of finding a special solution)
[combinatorics] recursive equation (summary of the solution process of recursive equation | homogeneous | double root | non-homogeneous | characteristic root is 1 | exponential form | the bottom is th
c# .net 工具生态
Analysis report on production and marketing demand and investment forecast of China's PVC industry from 2021 to 2026
统计图像中各像素值的数量
Graduation summary
Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
[vscode] convert tabs to spaces
How to install PHP on Ubuntu 20.04
Solve the problem of inaccurate network traffic monitored by ZABBIX with SNMP
Postfix tips and troubleshooting commands
聊聊支付流程的設計與實現邏輯
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]
Fedora 21 installs lamp host server
On Data Mining
MySQL has been stopped in the configuration interface during installation
Research Report on investment trends and development planning of China's thermal insulation material industry, 2022-2028
Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
Ssl/bio of OpenSSL_ get_ fd
聊聊支付流程的设计与实现逻辑