Why does `input()` always hand back text, and how do f-strings drop a computed value straight into a sentence?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
A user typed 3 at a prompt, so typed holds the string "3" — the quotes are
invisible at the keyboard, but they are there in memory. Multiply it by 5 and assign
the result to repeated. Think about what * does when one side is a string and the
other an integer.
input() pauses and hands back a string
Record that execution waits at the prompt, then compare num1 = input(...) with 5 * num1 printing 33333 against num2 = int(input(...)) with 5 * num2 printing 15.
One Newton's method step for a cube root
Write the program reading x and g, apply next_guess = g - (g ** 3 - x) / (3 * g ** 2) once for x = 27 and g = 5, and record 125 and about 3.69.
f-strings with expressions in braces
Write print(f"{number * fraction} is {fraction * 100}% of {number}") for number = 200 and fraction = 0.03, give the printed line, and note no casting or concatenation appears.