
ROHINUR
0 of 3 Саволҳо completed
Вопросы:
You have already completed the санҷиш before. Hence you can not start it again.
Санҷиш is loading…
You must sign in or sign up to start the санҷиш.
Сначала вы должны завершить следующее:
0 of 3 Саволҳо answered correctly
Your time:
Время истекло
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
For each of the following functions, give the signature and suggest a suitable precondition.
(a) TOUPPER, which changes a string, containing only lower-case letters, into the corresponding string consisting of upper-case letters. (So, for example, TOUPPER(“word”) = “WORD”.)
(b) REMOVELAST, which, given a sequence, deletes its last member.
(c) LAST, which returns the last member of a sequence.
Suppose that the days of the week are represented by numbers, with Mon-day represented by 1, Tuesday represented by 2, and so on, with Sunday represented by 7. Describe a function TOMORROW2, giving the next day with Days represented in this way.
(a) With s = “abcd”, evaluate each of:
(i) AT(1, s);
(ii) PUT(2, s, AT(1, s)).
(b) For a general sequence s, describe how the sequence PUT(2, s, AT(1, s)) is obtained from s.
The functions AT and PUT were described in Activity 16.