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
grigory [225]
4 years ago
9

Implement function translate() that provides a rudimentary translation service. The function input is a dictionary mapping words

in one language (the first language) to corresponding words in another (the second language). The function provides a service that lets users type a phrase in the first language interactively and then obtain a translation into the second language, by pressing the Enter/Return key. Words not in the dictionary should be translated as __

Computers and Technology
1 answer:
frosja888 [35]4 years ago
4 0

Answer:

Check the explanation

Explanation:

#method to find the word in one language and return

#corresponding word in other language

def translate(ltolDict):

#loop to display contents of the dictionary

   print("Welcome to the WordsRUs translation service.")

   word = input("Please enter a word: ")

   while word != "Quit" and word != "quit":

       if word in ltolDict:

           print(word ," means ", ltolDict[word])

       else:

           print(word ," means ", "________")

       word = input("Please enter a word: ")

   print("Thanks for using our translation service.")

A code screenshot can be seen below.

You might be interested in
Mrs. Zoo gave out the rubric for our essay. She stated that our essay should be complete by Friday of that week. I didn't have t
Rom4ik [11]

Answer:

No

Explanation:

You had the whole week for the essay but didn't do it and then turned it in late.

6 0
3 years ago
Assume that word is a variable of type string that has been assigned a value. Write an expression whose value is a string consis
Helga [31]

Answer:

Explanation:

The language I use would do it as

h1$ = copy(h$,1,3)

This may not satisfy you, because your language could be quite different. You might want an input statement of some kind that would define h$. This assumes that somewhere h,h1 are declared as  strings.

You also have to know how to read an input. My language uses readln(input,h)

and how to write it on the screen write(h1) or writeln(h1)

6 0
3 years ago
Compare and contrast Charles bebbage and Blaise Pascal inventions<br>​
telo118 [61]

Explanation:

A computer might be described with deceptive simplicity as “an apparatus that performs routine calculations automatically.” Such a definition would owe its deceptiveness to a naive and narrow view of calculation as a strictly mathematical process. In fact, calculation underlies many activities that are not normally thought of as mathematical. Walking across a room, for instance, requires many complex, albeit subconscious, calculations. Computers, too, have proved capable of solving a vast array of problems, from balancing a checkbook to even—in the form of guidance systems for robots—walking across a room.

Before the true power of computing could be realized, therefore, the naive view of calculation had to be overcome. The inventors who laboured to bring the computer into the world had to learn that the thing they were inventing was not just a number cruncher, not merely a calculator. For example, they had to learn that it was not necessary to invent a new computer for every new calculation and that a computer could be designed to solve numerous problems, even problems not yet imagined when the computer was built. They also had to learn how to tell such a general problem-solving computer what problem to solve. In other words, they had to invent programming.

They had to solve all the heady problems of developing such a device, of implementing the design, of actually building the thing. The history of the solving of these problems is the history of the computer. That history is covered in this section, and links are provided to entries on many of the individuals and companies mentioned. In addition, see the articles computer science and supercomputer.

Early history

Computer precursors

The abacus

The earliest known calculating device is probably the abacus. It dates back at least to 1100 BCE and is still in use today, particularly in Asia. Now, as then, it typically consists of a rectangular frame with thin parallel rods strung with beads. Long before any systematic positional notation was adopted for the writing of numbers, the abacus assigned different units, or weights, to each rod. This scheme allowed a wide range of numbers to be represented by just a few beads and, together with the invention of zero in India, may have inspired the invention of the Hindu-Arabic number system. In any case, abacus beads can be readily manipulated to perform the common arithmetical operations—addition, subtraction, multiplication, and division—that are useful for commercial transactions and in bookkeeping.

The abacus is a digital device; that is, it represents values discretely. A bead is either in one predefined position or another, representing unambiguously, say, one or zero.

Analog calculators: from Napier’s logarithms to the slide rule

Calculating devices took a different turn when John Napier, a Scottish mathematician, published his discovery of logarithms in 1614. As any person can attest, adding two 10-digit numbers is much simpler than multiplying them together, and the transformation of a multiplication problem into an addition problem is exactly what logarithms enable. This simplification is possible because of the following logarithmic property: the logarithm of the product of two numbers is equal to the sum of the logarithms of the numbers. By 1624, tables with 14 significant digits were available for the logarithms of numbers from 1 to 20,000, and scientists quickly adopted the new labour-saving tool for tedious astronomical calculations.

Most significant for the development of computing, the transformation of multiplication into addition greatly simplified the possibility of mechanization. Analog calculating devices based on Napier’s logarithms—representing digital values with analogous physical lengths—soon appeared. In 1620 Edmund Gunter, the English mathematician who coined the terms cosine and cotangent, built a device for performing navigational calculations: the Gunter scale, or, as navigators simply called it, the gunter. About 1632 an English clergyman and mathematician named William Oughtred built the first slide rule, drawing on Napier’s ideas. That first slide rule was circular, but Oughtred also built the first rectangular one in 1633. The analog devices of Gunter and Oughtred had various advantages and disadvantages compared with digital devices such as the abacus. What is important is that the consequences of these design decisions were being tested in the real world.

Digital calculators: from the Calculating Clock to the Arithmometer

In 1623 the German astronomer and mathematician Wilhelm Schickard built the first calculator. He described it in a letter to his friend the astronomer Johannes Kepler, and in 1624 . .

5 0
3 years ago
In computers, when the print command is executed, a cable carries this signal from the computer to the printer. In comparing a c
storchak [24]

Answer:

a) axon

Explanation:

In computers, when the print command is executed, a cable carries this signal from the computer to the printer. In comparing a computer to a neuron, the cable that carries the signal between the computer and the printer would be equivalent to an axon which is used to communicate messages to external cells.

Dendrites is not relevant because it represents the termination components of axon.

8 0
3 years ago
Whats difference between DCE AND DTE serial interface
harina [27]

DCE stands for data circuit-terminating, data communications, or data carrier equipment - this is a modem or more generally, a line adapter.

DTE stands for data terminal equipment which generally is a terminal or a computer.

Basically, these two are the different ends of a serial line.

7 0
3 years ago
Other questions:
  • When the word “computer” was coined, what did it mean?
    12·1 answer
  • What are "open-loop" and "closed-loop" systems
    11·1 answer
  • 3. By eliminating data redundancy, you're enforcing data A. validation. B. integrity. C. consistency. D. accuracy.
    14·2 answers
  • Which two ways should a developer create this functionality? A developer is asked to create a PDF quote document formatted using
    13·1 answer
  • Is LTE faster than 4G?
    8·1 answer
  • M
    15·1 answer
  • Convert 4.5 strides to girth
    10·1 answer
  • You need to synchronize your mobile device data with your desktop computer. for security reasons, your organization prohibits sy
    5·1 answer
  • Write a method that evaluates to true or false depending on whether a box completely fits inside another:
    12·1 answer
  • what is the term for software that is exclusively controlled by a company, and cannot be used or modified without permission?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!