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
Mice21 [21]
2 years ago
14

Which is not one of the four criteria for proving the correctness of a logical pretest loop construct of the form: while B do S

end? a. The loop terminates. b. {I and B} S {I} c. left curly bracket I space a n d space (n o t space B )right curly bracket space rightwards double arrow space Q d. I space rightwards double arrow space P e. P space rightwards double arrow space I
Computers and Technology
1 answer:
Paul [167]2 years ago
3 0

Answer: d. I space rightwards double arrow space P

Explanation:

The loop invariant must always satisfy a number of requirements for it to be considered useful. Another consideration is the complicating factor for loop termination. Any loop which cannot terminate would always not be correct, which tends to compute nothing. Below is a complete axiomatic illustration showing the construct required for it to be true, where I is the loop invariant:

P => I

{I and B} S {I}

(I and (not B)) => Q

the loop terminates

You might be interested in
Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
Lyrx [107]

Answer:

c and d

Explanation:

6 0
3 years ago
CS160 Computer Science I In class Lab 10
lianna [129]

Answer:

The program in Python is as follows:

fname = input("Enter the translation file name: ")

with open(fname) as file_in:

   lines = []

   for line in file_in:

       lines.append(line.rstrip('\n'))

myDict = {}

for i in range(len(lines)):

x = lines[i].split(":")

myDict[x[0].lower()] = x[1].lower()

print("Enter an English word to receive the Spanish translation.\nPress ENTER to quit.")

word = input("Enter an English word: ")

while(True):

if not word:

 break

if word.lower() in myDict:

 print("The Spanish word is ",myDict[word.lower()])

else:  

 print("I don’t have that word in my list.")

word = input("Enter an English word: ")

Explanation:

This prompts the user for file name

fname = input("Enter the translation file name: ")

This opens the file for read operation

with open(fname) as file_in:

This creates an empty list

   lines = []

This reads through the lines of the file

   for line in file_in:

This appends each line as an element of the list

       lines.append(line.rstrip('\n'))

This creates an empty dictionaty

myDict = {}

This iterates through the list

for i in range(len(lines)):

This splits each list element by :

x = lines[i].split(":")

This populates the dictionary with the list elements

myDict[x[0].lower()] = x[1].lower()

This prints an instruction on how to use the program

print("Enter an English word to receive the Spanish translation.\nPress ENTER to quit.")

This prompts the user for an English word

word = input("Enter an English word: ")

This loop is repeated until the user presses the ENTER key

while(True):

If user presses the ENTER key

if not word:

The loop is exited

 break

If otherwise, this checks if the word exists in the dictionary

if word.lower() in myDict:

If yes, this prints the Spanish translation

 print("The Spanish word is ",myDict[word.lower()])

If otherwise,

else:

Print word does not exist

 print("I don’t have that word in my list.")

Prompt the user for another word

word = input("Enter an English word: ")

5 0
2 years ago
Why are medical coders using encoded software
EastWind [94]
To keep the medical records confidential otherwise, hackers would take advantage of them and sell them to the highest bidder 
3 0
3 years ago
In terms of system thinking, what is process?
Talja [164]

Answer:b) The computer program that processes the data.

Explanation: In the computer system , process is the part of computer program which are responsible for performing of the processing of the data and other functions .The working of the process is associated with the program code and related activities/functions.

Other options that are mentioned in the question are incorrect because they don't describe the process correctly .Thus , the correct answer is option (b).

5 0
3 years ago
Read 2 more answers
Which stage best represents the developing of documents that provides the basis for acquiring the resources and for developing a
UkoKoshka [18]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is the planning stage. Because the planning stage represents the development of documents that provide the basis for acquiring the resources and for developing the requirement document. at this stage, you plan about what you are going to develop and how to develop it. At this stage, you come out mainly with two documents i.e. project proposal and requirement document.

Other options are not correct because:

In the project management, after planning, you will start designing the product, and after designing you start developing the product, and at the implementation stage, you implement or deploy the product to the customer or to the client. The requirement document that is developed at the planning stage can be used in the later stages of the project.

7 0
3 years ago
Other questions:
  • Is a component that provides a button control in a gui application or applet?
    15·1 answer
  • A ________ is a collection of forms, reports, queries, and programs that serves as an intermediary between users and database da
    6·1 answer
  • There are several factors that can substantially affect the consumer search process. Match the factor with an example of how the
    5·1 answer
  • This program has some errors in it that are needed to be checked import java.io.*;
    13·1 answer
  • While using the CLI on a Windows 10 64-bit computer with a single HDD and a single volume, you want to move from the current dir
    15·1 answer
  • Which of the following Internet protocols is used to request and send pages and files on the World Wide Web?
    15·1 answer
  • Name three recent advances that are influencing OS design.
    15·1 answer
  • Dose anyone know how to change username, grade level, and gender here? I have tried it in the change preferences and it says it
    8·2 answers
  • क) मानौं तिमी बसेको समाजमा मान्छेहरूले सधै फोहर फाल्ने गर्नाले वातावरण प्रदूषित
    13·1 answer
  • Suggest three ways in which celebrating an occasion influences food choices?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!