当前位置:网站首页>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()
边栏推荐
- Getting started with deops
- link preload prefetch
- win32:堆破壞的dump文件分析
- [mathematical logic] equivalent calculus and reasoning calculus of predicate logic (individual word | predicate | quantifier | predicate logic formula | two basic formulas | proposition symbolization
- Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028
- Introduction to PHP MySQL
- Global and Chinese pediatric palliative care drug market development research and investment planning recommendations report 2022-2028
- 基于人脸识别的课堂考勤系统 tkinter+openpyxl+face_recognition
- Codeforces Round #803 (Div. 2) C. 3SUM Closure
- Win32: analyse du fichier dump pour la défaillance du tas
猜你喜欢
Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
Tensorboard quick start (pytoch uses tensorboard)
PHP MySQL inserts data
STM32实现74HC595控制
微服务组件Sentinel控制台调用
Redis core technology and practice - learning notes (VII) sentinel mechanism
List的stream中Long对象与long判等问题记录
How to read the source code [debug and observe the source code]
Global and Chinese pediatric palliative care drug market development research and investment planning recommendations report 2022-2028
(8) HS corner detection
随机推荐
STM32实现74HC595控制
On Data Mining
Leetcode 538 converts binary search tree into cumulative tree -- recursive method and iterative method
link preload prefetch
c# . Net tool ecosystem
PHP MySQL inserts multiple pieces of data
Distributed task distribution framework gearman
[linux]centos 7 reports an error when installing MySQL "no package MySQL server available" no package ZABBIX server MySQL available
一入“远程”终不悔,几人欢喜几人愁。| 社区征文
【统信UOS】扫描仪设备管理驱动安装
Inheritance of ES6 class
Talk about the design and implementation logic of payment process
[combinatorics] generating function (summation property)
自动渗透测试工具核心功能简述
ArrayList分析3 : 删除元素
互聯網醫院HIS管理平臺源碼,在線問診,預約掛號 智慧醫院小程序源碼
How to read the source code [debug and observe the source code]
Fedora 21 安装 LAMP 主机服务器
Micro service component sentinel console call
Postfix tips and troubleshooting commands