Skip to content
DeepForgeby svx
All problems
MediumOptimizationop-367

Geometric Temperature Cooling

Problem

Geometric cooling multiplies the temperature by alpha each step: T_k = T_0 * alpha^k.

Given the initial temperature, alpha in (0, 1), and k, return the temperature after k steps.

Hint

Each step applies the same multiplicative factor.

Test cases

case 1
in: [100,0.9,10]
expected: 34.86784401000001
case 2
in: [1,0.5,1]
expected: 0.5
case 3
in: [10,0.99,100]
expected: 3.660323412732292
Starter codePython
def geometric_temperature_cooling(t0, alpha, k):
    # Your code here
    pass

3 test cases · run your code against them in the editor