Take User Input
And let’s tackle the last part of the challenge, which is prompting the user. So instead of adding the values for the amount, the rate, and the years inside your source code, you will use the
input() function to prompt the user to enter those values.
Enter the annual rate works, enter the number of years, and then you run into the error because only then you call the function in your code, and then you get a
TypeError that you can only concatenate string and not
int to another string.
02:04 Perfect. You might have felt that the challenge was a bit daunting at the beginning when I read it to you, but reducing a bigger challenge to smaller tasks and tackling them bit by bit makes this big challenge chewable.
02:19 And performing the actual steps was more straightforward than tackling the big challenge at once. Still, there might have been points where you were a bit confused, and that’s why I added some additional resources in the upcoming and last lesson of this video course where you can investigate some topics a bit further.
Become a Member to join the conversation.