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

 

dsawyer@methacton.org python_strings > addFirsts
prev  |  next  |  chance

The two parameters will contain positive integers. Complete the function so that it returns the sum of the two numbers' first digits.


addFirsts(34, 719) → 10
addFirsts(6038, 8) → 14
addFirsts(2, 1) → 3

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

def addFirsts( 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: 150 Post-solution available

Copyright Nick Parlante 2017 - privacy