{}

Build your resume with HTML & CSS and win $100

Get featured on Programiz PRO and the Wall of Inspiration.

Build your resume with HTML & CSS and win $100

Join Challenge →
Join Challenge →

Build your resume with HTML & CSS and win $100

Get featured on Programiz PRO and the Wall of Inspiration.

Build your resume with HTML & CSS and win $100

Join Challenge →
Join Challenge →
run-icon
main.py
import math attack = int(input("attack: ")) defense = int(input ("defense: ")) sattack = int(input("special attack: ")) sdefense = int(input("special defense: ")) speed = int(input("speed: ")) hp = int(input ("hp: ")) scaledattack = round((7/4) * max(attack, sattack)) + (1/4 * min(attack, sattack)) scaleddefense = round((5/4) * max(defense, sdefense)) + (3/4 * min (defense, sdefense)) speedmod = 1 + ((speed-75) /500) pkgoattack = round(scaledattack * speedmod) pkgodefense = round(scaleddefense * speedmod) pkgohp = math.floor(hp*1.75 + 50) maxcp40 = math.floor(((pkgoattack+15)*math.sqrt(pkgodefense+15)*math.sqrt(pkgohp+15)*0.7903*0.7903)/10) print(f" \nattack: {pkgoattack}\ndefense: {pkgodefense}\nhp: {pkgohp}\nmax combat power level 40: {maxcp40}\n" ) if maxcp40 > 4000: pkgoattack, pkgodefense, pkgohp = round(pkgoattack*0.91), round (pkgodefense*0.91), round(pkgohp*0.91) maxcp40 = math.floor(((pkgoattack+15)*math.sqrt(pkgodefense+15)*math.sqrt(pkgohp+15)*0.7903*0.7903)/10) print(f" \nattack: {pkgoattack}\ndefense: {pkgodefense}\nhp: {pkgohp}\nmax combat power level 40: {maxcp40}\n" )
Output