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

 

cse160-staff@cs.washington.edu cse160_20au_checkin03 > front3
prev  |  next  |  chance

Given a string, we'll say that the front is the first 3 chars of the string. If the string length is less than 3, the front is whatever is there. Return a new string which is 3 copies of the front.


front3('Java') → 'JavJavJav'
front3('Chocolate') → 'ChoChoCho'
front3('abc') → 'abcabcabc'

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

def front3(str):

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: 136.0

Copyright Nick Parlante 2017 - privacy