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
nikklg [1K]
3 years ago
14

1. If an F# function has type 'a -> 'b when 'a : comparison, which of the following is not a legal type for it? Select one:

Computers and Technology
1 answer:
Stella [2.4K]3 years ago
7 0

Answer:

B. string -> (int -> int)

Explanation:

We are going to perform comparison operations '->'. It is important to notice that the comparison operation gives us a bool value (True or False) and the comparison operation is legal if and only if the data types to be compared are the same.

Example:

int(4)->int(5) False

int(4)->int(4) True

int(4)->string(4) Error, data types don't match

For this reason:

  • A. Is legal because float -> float evaluates to True, True is a boolean value and bool -> bool is legal because both are the same data type.
  • B. Is illegal because int -> int evaluates to True, True is a boolean value and string is not a boolean (string -> bool).
  • C. Is legal because int is the same type than int.
  • D. Is legal because the list is the same type than list regardless it's content.

Note:

The operations inside parentheses are evaluated first.

List is a type by itself regardless of its content.

You might be interested in
Assume we are using the simple model for floating-point representation as given in this book (the representation uses a 14-bit f
Artemon [7]

Answer:

The representation of 100.0 in the floating-point representation is computed as follows: First convert the given number 100.0 in the binary form. 10010 = 11001002 the binary representation.

Explanation:

3 0
2 years ago
During her presentation, Marie wanted more freedom to move about the room and interact with her audience. She can use _____.
S_A_V [24]

Answer:

The correct answer is:

"a laser pointer and a remote control"

Explanation:

Let us look at the options one by one.

notes pages and an LCD projector

When she is using these options, she cannot have the freedom to move as she has to operate the projector somehow.

laptop computer and a pointer

In this case she has to operate laptop so movement will be reduced.

<u>A laser pointer and remote control</u> will give her a lot of freedom to move as she can use the remote control to operate the slides and the pointer to point stuff ont the slides.

Hence,

The correct answer is:

"a laser pointer and a remote control"

5 0
3 years ago
Consider the helicopter of Example 2.1, but with a slightly different definition of the input and output. Suppose that, as in th
anzhelika [568]

Answer:

Solution: In this case, the system can be modeled as a function with two output signals,

S: (R  --> R) --> (R --> R)^{2}

where

(S(T_{y}))(t) = (x(t), y(t))

where(x(t), y(t)) is the position of the tail in they plane. This model Is Clearly not linear. If the  Input torque doubles, for example, the output values will not double. In fact, the output values are constrained to lie on a circle centered at the origin, regardless of the Input. For this reason, the model is BIBO stable. The output is always bounded. Thus, while our previous model was linear and unstable, this one Is nonlinear and stable. Which model is more useful?

3 0
3 years ago
a password to a certain database consists of digits that cannot be repeated. if the password is known to consist of at least 8 d
BaLLatris [955]

Answer:

\frac{10!}{2}mins

Explanation:

12 seconds to try one combination will be equivalent to  \frac{1}{12}\times 60 = \frac{1}{5} \ mins

Password contain at least 8 digit i.e. password can contain 8, 9, 10 digit.

Password cannot contain more than 10 digit because it will give room for repetition which it is clearly stated that digit cannot be repeated.

Possible digit that can be used: 9,8,7,6,5,4,3,2,1,0.

Total number of passwords combination possible for each position in 8 digit.

1st position = 10, 2nd position = 9, 3rd position = 8, 4th position = 7, 5th position = 6, 6th position = 5, 7th position = 4, 8th position = 3. Total number of passwords combination possible in 8 digit is equivalent to \frac{10!}{2}.

Total number of passwords combination possible for each position in 9 digit.  

1st position = 10, 2nd position = 9, 3rd position = 8, 4th position = 7, 5th position = 6, 6th position = 5, 7th position = 4, 8th position = 3, 9th position = 2. Total number of passwords combination possible in 9 digit is equivalent to \frac{10!}{1}.

Total number of passwords combination possible for each position in 10 digit.

1st position = 10, 2nd position = 9, 3rd position = 8, 4th position = 7, 5th position = 6, 6th position = 5, 7th position = 4, 8th position = 3, 9th position = 2, 10th position = 1.  Total number of passwords combination possible in 10 digit is equivalent to 10!.

Adding them up and multiplying by  \frac{1}{5} \ mins  to get the total number of time needed to guarantee access to database =  [\frac{10!}{2}\times\ \frac{10!}{1} \times 10!] \frac{1}{5}\ mins = \frac{10!}{2}

7 0
3 years ago
Effective nonverbal communication can cause tension.<br><br> True or False
agasfer [191]

Explanation:

When your nonverbal signals match up with the words you're saying, they increase trust, clarity, and rapport. When they don't, they can generate tension, mistrust, and confusion.

4 0
3 years ago
Other questions:
  • All the computers in this type of network are connected to two other computers.
    12·1 answer
  • What website can help you find antivirus software
    5·2 answers
  • The Mail Merge option is located in which tab? a;home b;insert c;refernces d;mailings
    11·2 answers
  • Given an char variable last that has been initialized to a lowercase letter, write a loop that displays all possible combination
    8·1 answer
  • This is for career exploration, I need help please! &lt;3 HELPPPP
    8·2 answers
  • When an object is acted on by unbalanced forces, the object will always
    11·1 answer
  • How many passes will it take to find the five in this list?
    14·2 answers
  • 8.5 Edhesive Code Practice
    14·1 answer
  • What are the data type(s) will be used to declare the variable(s) needed to
    9·1 answer
  • The first time that a particular visitor loads a web site page is called a(n) _____.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!