My finger exercise answers for Introduction to Computing and Programming using Python (Guttag, 2016)
Questions answered so far:
2.4 (1) Finger Exercise
Replace the comment in the following code with a while loop.
numXs = int(input('How many times should I print the letter X? '))
toPrint = ''
#concatenate X to toPrint numXs times
print(toPrint)
2.4 (2) Finger Exercise
Write a program that asks the user to input to integers, and then prints the largest odd number that was entered. If no odd number was entered, it should print a message to that effect
3.2 Finger Exercise
Let s be a string that contains a sequence of decimal numbers
separated by commas, e.g., s = '1.23,2.4,3.123'. Write a program that prints the
sum of the numbers in s.
3.3 Finger Exercise
What would have to be changed to make the code in Figure #3.4 work for finding an approximation to the cube root of both negative and #positive numbers? (Hint: think about changing low to ensure that the answer #lies within the region being searched.)