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
Oxana [17]
4 years ago
6

Write a program that prints the number 1 through 10 using a while loop

Computers and Technology
1 answer:
vova2212 [387]4 years ago
7 0
Which programming language are you working in?

Here is how you could achieve this in Python:

establish a counter, starting at 1.
While your counter is 10 or less, do two things:
print the counter,
and increase the counter by 1.

code:
counter = 1

while counter <= 10:
print(counter)
counter = counter + 1

Those last two lines should be indented.
You might be interested in
in a deisgn project, what two types of graphics or images is the digital artist respondsible for creating?
Inga [223]
Vector and raster images
7 0
3 years ago
In database transaction concurrency, the lost update anomaly is said to occur if a transaction Tj reads a data item, then anothe
Jet001 [13]

Answer:

The answer is attached in the document file.

Explanation:

The explanation is given in the attached file.

                             

Download docx
5 0
3 years ago
Implement the function is_maxheap which takes a list of integers and returns True if the list represents a valid max-heap, and F
harkovskaia [24]

Answer:

I am writing a Python function:

def is_maxheap(list):

   #finds the length of the list  

   size=len(list)

   #loop has a variable i which starts traversing from root til end of last #internal node

   for i in range(int((size - 2) / 2) + 1):  

       if list[2 * i + 1] > list[i]:  #If left child is greater than its parent then return #false  

               return False  

       if (2 * i + 2 < size and

           list[2 * i + 2] > list[i]):    #checks if right child is greater, if yes then #returns false  

               return False

   return True

Explanation:

The function is_maxheap() traverses through all the internal nodes of the list iteratively. While traversing it checks if the  node is greater than its children or not. To check the working of this function you can write a main() function to check the working on a given list. The main() function has a list of integers. It then calls is_maxheap() method by passing that list to the function. The program displays a message: "valid max heap" if the list represents valid max-heap otherwise it returns invalid max heap.

def main():

   list = [10,7,8]  

   size = len(list)  

   if is_maxheap(list):

       print("Valid Max Heap")  

   else:  

       print("Invalid Max Heap")          

main()

The program along with its output is attached in a screenshot.

5 0
4 years ago
Why is it essential to know what information will be needed from the database from the outset of development?
KIM [24]

Answer:

all of the answers

Explanation:

According to my research on information technology, I can say that based on the information provided within the question all of the answers provided would be important pieces of information to know. This is because each provides information on another and all information possible is helpful in a development process.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
4 years ago
a flow chart is the _______ representation of the sequence of steps required of steps required to solve a particular problem​. I
Eddi Din [679]

Answer:

A flowchart is simply a graphical representation of steps. It shows steps in sequential order and is widely used in presenting the flow of algorithms, workflow or processes. Typically, a flowchart shows the steps as boxes of various kinds, and their order by connecting them with arrows.

7 0
3 years ago
Other questions:
  • Examples of language translator
    12·2 answers
  • Hailey is preparing a questionnaire on the different number systems. He asks the students to write down the correct decimal and
    7·2 answers
  • Advantages of purchasing a software package over developing software in-house include all of the following except ____. Group of
    13·1 answer
  • Five batch jobs. A through E, arrive at a computer center at almost the same time. They have estimated running times of 10, 6, 2
    14·1 answer
  • This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three dou
    11·1 answer
  • What do secondary sources rely on for their analysis of events?
    6·2 answers
  • For each recursive call, display the outputs on a separate line and add a level of indentation. do your utmost to make the outpu
    10·1 answer
  • What effect does social media have on teens?
    10·2 answers
  • Which clue can be used to identify a chemical reaction as a combustion reaction?
    9·1 answer
  • Study the graph and answer the questions. The numbers on the left side of the graph are in thousands.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!