File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 11"""
22Replace
33
4- Write a Python program to print a string
5- from a given string where all occurrences
6- of its first char have been changed to '$',
4+ Write a Python program that asks the user for a string
5+ and then prints a version of that string
6+ where all occurrences of its first char
7+ have been changed to '$',
78except the first char itself.
8- Sample String : 'restart'
9- Expected Result : 'resta$t'
9+
10+ Sample Input: 'restart'
11+ Expected Output: 'resta$t'
1012
1113Adapted from W3Resource, problem 4:
1214https://www.w3resource.com/python-exercises/string/
Original file line number Diff line number Diff line change 11"""
22Replace
33
4- Write a Python program to print a string
5- from a given string where all occurrences
6- of its first char have been changed to '$',
4+ Write a Python program that asks the user for a string
5+ and then prints a version of that string
6+ where all occurrences of its first char
7+ have been changed to '$',
78except the first char itself.
89
9- Sample String : 'restart'
10- Expected Result : 'resta$t'
10+ Sample Input : 'restart'
11+ Expected Output : 'resta$t'
1112
1213Adapted from W3Resource, problem 4:
1314https://www.w3resource.com/python-exercises/string/
You can’t perform that action at this time.
0 commit comments