We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It's because they're two different variables. width in line 2 belongs to the user program, while the other width belongs to the format function (noted by {width}).
Although not exactly the same, a similar example would be a variable defined in a function versus after (and outside of) one:
String Formatting
You are viewing a single comment's thread. Return to all comments →
It's because they're two different variables.
width
in line 2 belongs to the user program, while the otherwidth
belongs to theformat
function (noted by{width}
).Although not exactly the same, a similar example would be a variable defined in a function versus after (and outside of) one:
Which returns the following: