id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

gaurav1780@gmail.com 06_strings > multiply
prev  |  next  |  chance

Define a function that when passed two Strings, each holding a (possibly very very long integer) as a String, returns the product of the two numbers, as a String. You may assume that both numbers are positive (more than zero). NOTE: The strings can be very very very very long so don't even try to convert them to integers.


multiply('17', '29') → '493'
multiply('3', '17') → '51'
multiply('4839527935721064820512950238530583045835038502850135', '2359290467193567359582134028563205') → '11417852124463671646266771719350556350413298456021105436575136216272226427891490282675'

...Save, Compile, Run (ctrl-enter)

def multiply (a, b):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 7 Post-solution available

Copyright Nick Parlante 2017 - privacy