M
MJS
I need help and I have not written any code yet.
I have to ask the user to input any two digits e.g input= 3,5 (upto
300). These two numbers are associated with two different strings. As
an example, 3 is associated to "hello" and 5 is associated to "cool".
After the input, an existing file at different locations should be
updated. These locations can be determined by certain strings e.g "how
r u" and "is it hot"? After these strings, text like hello_1, hello_2
hello_3 and cool_1, cool_2 etc should be added to this file. The
number of times hello_1, hello_2 etc and cool_1, cool_2 etc. should be
added depends on the users input.
e.g
a file contains some text.
...... "how r u" ..... "is it hot".......
when the user inputs 3, 5. The file should then be updated to
...... "how r u" hello_1,hello_2,hello_3 ..... "is it hot" cool_1,
cool_2, cool_3, cool_4, cool_5........
Please provide some suggestions.
I have to ask the user to input any two digits e.g input= 3,5 (upto
300). These two numbers are associated with two different strings. As
an example, 3 is associated to "hello" and 5 is associated to "cool".
After the input, an existing file at different locations should be
updated. These locations can be determined by certain strings e.g "how
r u" and "is it hot"? After these strings, text like hello_1, hello_2
hello_3 and cool_1, cool_2 etc should be added to this file. The
number of times hello_1, hello_2 etc and cool_1, cool_2 etc. should be
added depends on the users input.
e.g
a file contains some text.
...... "how r u" ..... "is it hot".......
when the user inputs 3, 5. The file should then be updated to
...... "how r u" hello_1,hello_2,hello_3 ..... "is it hot" cool_1,
cool_2, cool_3, cool_4, cool_5........
Please provide some suggestions.