Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

need help with short code for google dev assignment

$
0
0
Here is the prompt for which I want to write a code for. I have figured out how to write a code JUST for the word "babble" but i need to make a code that applies to any word.

# C. fix_start
# Given a string s, return a string
# where all occurences of its first char have
# been changed to '*', except do not change
# the first char itself.
# e.g. 'babble' yields 'ba**le'
# Assume that the string is length 1 or more.
# Hint: s.replace(stra, strb) returns a version of string s
# where all instances of stra have been replaced by strb.

Thoughts?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>