1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Scrat [10]
3 years ago
5

Write Scheme functions to do the following. You are only allowed to use the functions introduced in our lecture notes and the he

lper functions written by yourself. (a) Return all rotations of a given list. For example, (rotate ’(a b c d e)) should return ((a b c d e) (b c d e a) (c d e a b) (d e a b c) (e a b c d)) (in some order). (b) Return a list containing all elements of a given list that satisfy a given predicate. For example, (filter (lambda (x) (< x 5)) ’(3 9 5 8 2 4 7)) should return (3 2 4).
Computers and Technology
1 answer:
klio [65]3 years ago
7 0

Answer:

Check the explanation

Explanation:

solution a:

def Rotate(string) :

n = len(string)

temp = string + string

for i in range(n) :

for j in range(n) :

print(temp[i + j], end = "")

print()

string = ("abcde")

Rotate(string)

solution b:

nums = [3,9,5,8,2,4,7]

res = list(filter(lambda n : n < 5, nums))

print(res)

You might be interested in
Posts that you delete
kiruha [24]
Answer
are visible to others may already have been shared
8 0
2 years ago
1. Which mechanical part or feature listed in the section on Critical Vehicle Systems do you think is most important?
kaheart [24]
I think it would be seatbelt but is it a multiple choice if so what's the choices
3 0
4 years ago
Read 2 more answers
Create a single line comment that says ""Print results to screen""
levacccp [35]

Answer:

//""Print results to screen""

Explanation:

In c,c++,java,javascript // is used for the single line comment.

syntax:- // comment.

Whatever text that is followed after // is commented means this line will not get executed by the compiler.

Comments are used to explain the code to other person who is working on the code or trying to understand that code.

6 0
3 years ago
In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
WARRIOR [948]

Answer:

Lexical rules that are defined in case of regular grammar are simple and the notation is quite easy to understand.

Regular expression are useful for defining constructs of identifiers or constants. e.g. a|b etc.

In the case of context-free, grammar is not simple and deals with the productions.

Context-free are useful in describing the nested constructs like if-else etc which are not defined by regular expressions.

These produce a higher level of reliability as it provides a medium for generating syntactical as well as semantic data. The grammar is context-free is a little complex.

Explanation:

8 0
3 years ago
What are the basic functions of an operating system? List any four of them.​
sammy [17]

Answer:

Following are some of important functions of an operating System.

Memory Management.

Processor Management.

Device Management.

File Management.

Security.

Control over system performance.

Job accounting.

Error detecting aids.

Explanation:

PLS MAKE ME AS BRAINLIST

5 0
3 years ago
Other questions:
  • 38. Which of the following best describes why e-mail spoofing is easily executed? a. SMTP lacks an adequate authentication mecha
    15·1 answer
  • You can change the location of the layers panel on the screen by _____ .
    7·1 answer
  • I have gtx880m Alienware 18.4” no video how do I repaste the chip
    7·1 answer
  • Which command displays the status of the ipsec installation?
    7·1 answer
  • 5. Why are female fans particularly valuable to the sports industry? Cite two<br> specific reasons.
    11·1 answer
  • What are the reasons why is it necessary to evaluate online sources and content?
    6·1 answer
  • User authentication is a procedure that allows communicating parties to verify that the contents of a received message have not
    12·1 answer
  • why might a portrait be both a portrait of the subject and the photographer? how is a photographer present in a portrait?
    10·2 answers
  • How do you freeze the total cell so that it doesn't change when copied?
    6·1 answer
  • When do we use SAVE and SAVE AS in saving artwork in adobe illustrator?<br> PLEASE HELP ASAP
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!