Aug-15-2018, 03:40 AM
(This post was last modified: Aug-15-2018, 03:40 AM by collectorKim.)
Hello pritesh,
I've purchased the book couple of days ago so can be prepared for my Mathematics and Computer Science course starting from September / October.
Thought I'd share my method!
I've purchased the book couple of days ago so can be prepared for my Mathematics and Computer Science course starting from September / October.
Thought I'd share my method!
numXs = int(input('How many times should I print the letter X?\n')) counter = 0 toPrint = '' while counter < numXs: toPrint += 'X' counter += 1 print(toPrint)I used a counter instead of changing the value of numXs.