当前位置:网站首页>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()

边栏推荐
- 聊聊支付流程的设计与实现逻辑
- As soon as we enter "remote", we will never regret, and several people will be happy and several people will be sad| Community essay solicitation
- Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028
- Redis core technology and practice - learning notes (VI) how to achieve data consistency between master and slave Libraries
- Introduction to PHP MySQL
- PHP MySQL reads data
- Redis on local access server
- i++与++i的区别:通俗易懂的讲述他们的区别
- Records of long objects and long judgments in the stream of list
- 聊聊支付流程的設計與實現邏輯
猜你喜欢

Analysis report on production and marketing demand and investment forecast of China's PVC industry from 2021 to 2026
![[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](/img/f1/c96c4a6d34e1ae971f492f4aed5a93.jpg)
[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

As soon as we enter "remote", we will never regret, and several people will be happy and several people will be sad| Community essay solicitation

Three gradient descent methods and code implementation

Leetcode 538 converts binary search tree into cumulative tree -- recursive method and iterative method

基于人脸识别的课堂考勤系统 tkinter+openpyxl+face_recognition

Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition

(9) Opencv Canny edge detection

Cloud primordial weekly | CNCF released the 2021 cloud primordial development status report, which was released on istio 1.13

STM32实现74HC595控制
随机推荐
Redis core technology and practice - learning notes (IX): slicing cluster
Win32: dump file analysis of heap corruption
SDNUOJ1015
OpenSSL的SSL/BIO_get_fd
网格图中递增路径的数目[dfs逆向路径+记忆dfs]
[combinatorics] recursive equation (four cases where the non-homogeneous part of a linear non-homogeneous recursive equation with constant coefficients is the general solution of the combination of po
Gear2021 monthly update - December
互聯網醫院HIS管理平臺源碼,在線問診,預約掛號 智慧醫院小程序源碼
Internet Hospital his Management Platform source, online Inquiry, appointment Registration Smart Hospital Small program source
How to enforce parameters in PowerShell- How do I make parameters mandatory in PowerShell?
Introduction to SolidWorks gear design software tool geartrax
A. Berland Poker & 1000 [simple mathematical thinking]
WEB-UI自动化测试-最全元素定位方法
数学公式(测试)
IntelliJ 2021.3 short command line when running applications
win32:堆破壞的dump文件分析
Loop through JSON object list
[LINUX]CentOS 7 安装MYSQL时报错“No package mysql-server available“No package zabbix-server-mysql availabl
i++与++i的区别:通俗易懂的讲述他们的区别
Website with JS doesn't work in IE9 until the Developer Tools is activated