Main.Assignment7 History
Hide minor edits - Show changes to markup
Put the function in a file called multiply.py and have your program ask the user for two integers. If the input provided by the user are not integers, your program should raise an exception.
Recursive counting
Write a function count(s, char) that counts the number of times the character char occurs in the string s. Do it using recursion without any loop construct.
Put the function in a file called count_char.py.
Due date: 3/22/10
Write a function mult(x, y) that recursively computes the value of x * y, where x and y are integers, without using multiplication, or any loop construct. Your function should be able to handle negative numbers as well.
Write a function mult(x, y) that recursively computes the value of x * y, where x and y are integers, without using multiplication, or any loop construct. Your function should be able to handle negative numbers as well.
Assignment 7
Recursive multiplication
Write a function mult(x, y) that recursively computes the value of x * y, where x and y are integers, without using multiplication, or any loop construct. Your function should be able to handle negative numbers as well.
