Question: I need to craft a program around the following parameters: Prompt the user for a job and a number (call itincrement). Display the job in

I need to craft a program around the following parameters: Prompt the user for a job and a number (call itincrement). Display the job in lower case, but convert everyincrementcharacter to upper case. Count have many times you had to change the case of a character.

I have this so far:

job = input("Please enter a job: ")

print(job)

increment = int(input("Please enter the increment: "))

print(increment)

counter = 0

changes = 0

for ch in job:

counter = counter + 1

if counter == increment:

newch = ch.upper()

counter = 0

else:

newch = ch.lower()

if ch != newch:

changes = changes + 1

print(newch, end="")

print()

print("There were", changes, "changes")

but I am getting this error:

ACTUAL:There~were~9~changes

EXPECTED:There~were~10~changes

Any help would be appreciated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!