with given regular hourlywage ''include overtime for hours over the problem clearly indicates two caseswhen no more than hours are worked or when more than hours are worked in case more than hours are workedit is convenient to introduce variable overtimehours you are encouraged to think about solution before going on and examining mine you can try running my complete example programwages pyalso shown below the format operation at the end of the main function uses the floating point format (string formats for float precision (page )to show two decimal places for the cents in the answerdef calcweeklywages(totalhourshourlywage)'''return the total weekly wages for worker working totalhourswith given regular hourlywage include overtime for hours over ''if totalhours < totalwages hourlywage*totalhours elseovertime totalhours totalwages hourlywage* ( *hourlywage)*overtime return totalwages def main()hours float(input('enter hours worked')wage float(input('enter dollars paid per hour')total calcweeklywages(hourswageprint('wages for {hourshours at ${wage fper hour are ${total fformat(**locals())main(here the input was intended to be numericbut it could be decimal so the conversion from string was via floatnot int below is an equivalent alternative version of the body of calcweeklywagesused in wages py it uses just one general calculation formula and sets the parameters for the formula in the if statement there are generally number of ways you might solve the same problemif totalhours < regularhours totalhours overtime elseovertime totalhours regularhours return hourlywage*regularhours ( *hourlywage)*overtime the in boolean operatorthere are also boolean operators that are applied to types others than numbers useful boolean operator is inchecking membership in sequencevals ['this''is''it'isin vals true 'wasin vals false it can also be used with notas not into mean the oppositevals ['this''is''it'isnot in vals false more on flow of control