Pet qualification and scoring --Python

import easygui
class Pets():
    def __init__(self,x,y,y1,y2,y3):
        self.x = float(x)
        self.y = float (y)
        self.y1 = float(y1)
        self.y2 = float(y2)
        self.y3 = float(y3)

    def single(self):
        Z = self.y * 0.2565 + 89.5865 + 37.767 * self.x 
        Z1 = self.y1 self.x * * 89.5865 0.2565 + 37.767 + 
        Z2 = self.y2 self.x * * 0.2565 + 89.5865 + 37.767 
        Z3 = self.y3 self.x + 0.2565 * 89.5865 * + 37.767 
        S = easygui.buttonbox (MSG = [ ' full level full star fighting properties: ' , Z, ' full level full star Fitness properties: ' , Z1], title = ' results ' , choices = ( ' again ' , ' end ' ))
         return S

    def score(self):
        Yl = (96.4 - self.y * 0.0035) + 0.2886 * * self.x self.y - 26.26 
        Y2 = (96.4 - self.y2 * 0.0035) + 0.2886 * * self.x self.y2 - 26.26 
        Z = Yl / 66.7 + Y2 * 1698/1693 * 33.3 
        S = easygui.buttonbox (MSG = ( ' the attribute is: ' , Z), title = ' results ' , choices = ( ' again ' , ' end ' ))
         return S
from PETS.sl import *
import easygui
import sys

# C = Qucik Facts Pets () 
S = ' again ' 
the while S == ' again ' :

    RET = easygui.buttonbox (MSG = " Choose or calculate the total score of the individual qualifications ' , title = ' selected page ' , choices = ( ' individual attribute calculation ' , ' calculated total score ' ), Image = '' )
     IF RET = = ' individual attribute calculation ' :
        ZET = easygui.multenterbox (MSG = ' Please Enter the relevant data ' , title = ' data fill ' , Fields = [ ' pet growth rate ' , ' fight ' , ' fit ' , ' loyalty ' , ' Smart ' ])
        x = set [0]
        y = converts [1 ]
        y1 = slip [2 ]
        y2 = converts [3 ]
        y3 = converts [4 ]
        C = Pets(x,y,y1,y2,y3)
        s = C.single()
        pass

    else:
        CET = easygui.multenterbox (MSG = ' Please Enter the relevant data ' , title = ' data fill ' , Fields = [ ' primary property qualification ' , ' sub-qualification attributes ' , ' pet growth rate ' ])
        x = this [2 ]
        y = the [0]
        y2 = this [1 ]
        y1 = 0
        Y3 = 0
        C = Pets(x, y, y1, y2, y3)
        s = C.score()
else:
    sys.exit(0)

 

Guess you like

Origin www.cnblogs.com/dongyejiannuan/p/11761757.html