本文整理汇总了Python中Simulation.execute方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.execute方法的具体用法?Python Simulation.execute怎么用?Python Simulation.execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Simulation
的用法示例。
在下文中一共展示了Simulation.execute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: input
# 需要导入模块: import Simulation [as 别名]
# 或者: from Simulation import execute [as 别名]
# Copyright © 2016 Jalel Benerrami. All rights reserved.
# from /Users/jalelbenerrami/Desktop/project_Python/Point2D import*
# from /Users/jalelbenerrami/Desktop/project_Python/Simulation import*
from Point2D import *
from Simulation import *
#
# Run programm by choosing parameters into the terminal
#
# Number of random points
n = input("\nEnter the number of points you want to generate : ")
n = int(n)
print(n, "\n")
# Choose a strategy
s = input("Choose a strategy : " )
s = int(s)
print(s, "\n")
# Create a simulation with given number of points
Sim = Simulation(n)
# Execute the created simulation
Sim.execute(s)
# Display the information about executed simulation
print(Sim, "\n")