Question: His program is shown below: # Knightro # Lab 1 : Challenge 1 # COP 2 5 0 0 # Aug 2 8 , 2
His program is shown below:
# Knightro
# Lab : Challenge
# COP
# Aug
# Ask for input
stepsinput How many steps?
distanceinput Total feet traveled?
# Calculate Steps
pace distance steps
# Output paces as inches
printYour average step ispace, "inches"
He is getting this error.
pace distance steps
TypeError: unsupported operand types for : str and str
This is because distance and steps are not numeric data but strings. How can we correct his program so it can run?
Question
pts
The number of steps should be a whole number. How can we correct this line of code to accept input as a whole number?
stepsinput How many steps?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
