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
Setler [38]
3 years ago
8

The while loop has two important parts: a condition that is tested and a statement or block of statements that is repeated as lo

ng as the expression ________.
Computers and Technology
1 answer:
natima [27]3 years ago
8 0

Answer:

TRUE

Explanation:

The while loop is used to run the block of statement again and again until condition is TRUE. if condition false program terminate the loop and execute the next of while statement.

syntax:

initialize;

while(condition)

{

 statement;

  increment/decrement;

)

when condition is TRUE, the block of statement execute again and again.

You might be interested in
1. Implement the function dict_intersect, which takes two dictionaries as parameters d1 and d2, and returns a new dictionary whi
stich3 [128]

Answer:

1  

def dict_intersect(d1,d2): #create dictionary

  d3={} #dictionaries

  for key1,value1 in d1.items():       #iterate through the loop  

      if key1 in d2:   #checking condition

          d3[key1]=(d1[key1],d2[key1])   #add the items into the dictionary  

  return d 3

print(dict_intersect({'a': 'apple', 'b': 'banana'}, {'b': 'bee', 'c': 'cat'})) #display

2

def consolidate(*l1):  #create consolidate

  d3={} # create dictionary

  for k in l1:       #iterate through the loop

      for number in k:   #iterate through  the loop                               d3[number]=d3.get(number,0)+1   #increment the value

             return d 3 #return

print(consolidate([1,2,3], [1,1,1], [2,4], [1])) #display

Explanation:

1

Following are  the description of program

  • Create a dictionary i.e"dict_intersect(d1,d2) "   in this dictionary created a dictionary d3 .
  • After that iterated the loop and check the condition .
  • If the condition is true then add the items into the dictionary and return the dictionary d3 .
  • Finally print them that are specified in the given question .

2

Following are  the description of program

  • Create a dictionary  consolidate inside that created a dictionary "d3" .
  • After that iterated the loop outer as well as inner loop and increment the value of items .
  • Return the d3 dictionary and print the dictionary as specified in the given question .

5 0
4 years ago
Which element always appears to start on a new line in the browser window
pantera1 [17]
C hope this helps bye
5 0
3 years ago
Using evidence to dispel myths or false beliefs is one way to move closer to evidence-based practice. Please select the best ans
Marrrta [24]
The correct answer is TRUE
7 0
4 years ago
Read 2 more answers
Outlines help you visualize the slides and the points you will include on each slide.
kvv77 [185]
I don’t know I think true
6 0
3 years ago
How to make wrapped loops step by step?
diamong [38]

Answer:

what the heck? what kind of question is that

4 0
3 years ago
Other questions:
  • Keyboard shortcut could you use instead of clicking the icon
    11·1 answer
  • ____________________ memory is the ability to add RAM without shutting down the computer or operating system.
    13·1 answer
  • Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
    13·2 answers
  • Write a c++ application that computes gross salary for Mr.A,given that during the interview session and before started work, it
    5·1 answer
  • The variables xp and yp have both been declared as pointers to integers, and have been assigned values. Write the code to exchan
    6·1 answer
  • Select the variable that illustrates the ratio scale of measurement. (a) gender (b) weight (c) political party affiliation (c) r
    13·1 answer
  • Your customer then asks you if it would be worth the investment for him to have Ethernet cabling installed to reach each of his
    7·2 answers
  • Judy forgot where she saved a certain file on her computer. Therefore, she searches for all files with a .jpg file extension. Wh
    7·2 answers
  • Write a C++ program that reads a temperature value and the letter C for Celsius or F for Fahrenheit. Print whether water is liqu
    14·1 answer
  • What happen if there is no authentication??
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!