Practical work
The task:
Write the program code to convert the entered strings to lower case.
Write a program code that determines whether the sentence is complete.
Write a program code to replace all characters in even positions by 1.
Write a program code that replaces in the line all occurrences of the word “dream” by “elephant”. * Check if a replacement will be performed for the words SON, etc. Why? Suggest a solution to the problem.
Write a program code that returns a string starting from 2 positions to the penultimate position. * Check what happens if the entered string will consist of only one or 2 characters.
Tasks selected * - differentiation.
Additional tasks:
1* Add a comment to the program code.
2 * Analyze when your program may produce an
incorrect result?
Descriptors | ball |
Describes a string type in program code. | 1 |
Defines the length of a string using the standard string processing function. | |
Uses a string processing function to replace characters / words. | |
Applies a cycle | |
Defines the result of the program | |
The program code does not contain errors |
© ООО «Знанио»
С вами с 2009 года.