Read the following code:


x = 1

while(x < 26)

print(x)

x = x + 1


There is an error in the while loop. What should be fixed?


1. Add a colon to the end of the statement

2. Begin the statement with the keyword count

3. Change the parentheses around the test condition to quotation marks

4. Use quotation marks around the relational operator

Answers

Answer 1

This is python code.

In python, you are supposed to put a colon at the end of while loops. This code does not have a colon after the while loop, therefore, you need to add a colon to the end of the statement.

Answer 2

The error to be fixed in the while loop is to add a colon at the end of the while statements.

x = 1

while (x<26)

     print(x)

     x = x + 1

This is the right code;

x = 1

while(x < 26):

   print(x)

   x = x + 1

The actual code , the while statement is missing a colon at the end of it.

The code is written in python. In python while or for loops statements always ends with a colon.

In the error code, there was no colon at the end of the while loop.

The right codes which I have written will print the value 1 to 25.

learn more on python loop here: https://brainly.com/question/19129298?referrer=searchResults


Related Questions

China is selling school supplies in the United States for very low prices, even lower than the
preventing prices in China, and thus making it extremely difficult for American manufacturers to
compete. This is referred to as

Answers

Answer:

dumping.

Explanation:

dumping. China is selling school supplies in the United States for very low prices, even lower than the prevailing prices in China, and thus making it extremely difficult for American manufacturers to compete. This is referred to as DUMPING.

Wrire a code that display elements at indices 1 and 4 in the follwoing array.

var userArray = [1, 6, 41, 8, 24, 4];

Answers

Answer:

Console.log(userArray[1]);

Console.log(userArray[4]);

Explanation:

The programming language was not stated; however, the variable declaration implies JavaScript.

JavaScript prints using the following syntax:

Console.log(print-name);

Since, the code is to print some elements of array userArray.

First, we need to determine the index of the elements.

The indices are given as 1 and 4.

So, the code to print these elements is as follows:

Console.log(userArray[1]);

Console.log(userArray[4]);

True or false? The following deterministic finite-state automaton recognizes the set of all bit strings such that the first bit is 0 and all remaining bits are 1’s.

Answers

Answer:gjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

Explanation:

A ________helps to present data in a row and column format. ​

Answers

Answer:

Tally marks

Explanation:

Tally marks on the Tally table can help us to represent data in a row and column format. ​

If my answer helped, kindly mark me as the Brainliest!!

Thank You!!

Table

In a table the datas are arrange in rows and columns.

Kara's teacher asked her to create a chart with horizontal bars. Which chart or graph should she use?

Bar graph
Column chart
Line graph
Pie chart

Answers

Answer:

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

Explanation:

The correct answer to this question is the Bar graph.

Because we use this chart type to visually compare values across a few categories when the charts show duration or when the category text is long.

However, we can present information similarly in the bar graph and in column charts, but if you want to create a chart with the horizontal bar then you must use the Bar graph. In an Excel sheet, you can easily draw a bar graph and can format the bar graph into a 2-d bar and 3-d bar chart.

A column chart is used to compare values across a few categories. You can present values in columns and into vertical bars.

A line graph chart is used to show trends over months, years, and decades, etc.

Pie Chart is used to show a proportion of a whole. You can use the Pie chart when the total of your numbers is 100%.

Answer:

Bar graph option A

Explanation:

I did the test

Write code that Uses the range() in a for loop to iterate over the positions in user_names in order to modify the list g

Answers

Answer:

Explanation:

The range() function is a built-in function in the Python programming language. In the following code, we will use this function to iterate over all the positions in the array called user_names and add them to the list g. (assuming that is what was meant by modifying the list g)

for i in range( len(user_names) ):

   g.append(user_names[i])

This simple 2 line code should do what you are asking for.

Which part of the formula is the argument?

=COUNTIF(A1:E59, "Greene City")

=

()

COUNTIF

A1:E59

Answers

Answer:

e on edege

Explanation:

just took the question on edge

Answer:

Guy above is right!

Explanation:

what is the importance of human flourishing to science and technology?​

Answers

Explanation:

:*):*):*)*)*:)*:)*:*)*:**:*)*:)*:)*:*):*)*P:)*:*):*)

:*

):*

)*:

)*:*

):*):*)*:*):*)*:*):*):*):)*:*):*):*):*)

:*):*)

Complete the sentence.
You can buy new applications at a retail store on DVD for ____.

O laptops
O smartphones
O tablets

Answers

Answer:

laptops

Explanation:

B

You can buy new applications at a retail store on DVD for laptops. Thus, option A (laptops) is correct.

What is a DVD?

A website is an accumulation of internet pages and related items that is posted on at least one server and given an unique domain name. Most blogs focus on a single subject or objective, such as reporting, education, industry, entertaining, or photo sharing.

A raster-based photograph designed for the web and publishing is stored as a JPG file. The JPG format is the default file format for image sensors and is the most widely used picture format on the web because of its universal compatibility and decompression. Portraits in both colour and black and white work brilliantly with them.

Therefore, option A (laptops) is the correct option.

Learn more about DVD, here:

https://brainly.com/question/13664390

#SPJ6

what is the provincial capital of lumbini province​

Answers

Answer:

hope it helps..

Explanation:

Butwal(recently changed again) , Rupendhai District

Need help with coding.
I'm trying to input a list that uses int(input("Element: ")) and it's causing an error. Anything to help with this?

Answers

You could try something likes this.

lst = []

n = int(input("Number of elements: ))

for i in range(0, n):

element = int(input("Element: "))

lst.append(element)

Create a survey questionnaire with at least 10 questions to find out how teens are using social networking sites. Your data should contain a minimum of 30 valley questionnaires in each respondent must answer all the questions for that questionnaire to be valid. Analyze the data collected using charts or graphs. What are your findings from the survey? Collate the findings by summarizing the answers for each question. Present a graph or chart to represent the data you collected.

Answers

Possible Questions:

- What social media platforms do you use on a daily basis?

- Where did you hear about these social media platforms?

- What made you join these social media platforms?

- What social media platform(s) do you prefer the most?

- Why might you suggest these social media platforms to a friend?

- What does having and using this platform mean to you?

- What does your preferred platform allow you to do?

- Has using this platform changed you in any way? (Are you more connected, concerned, aware, etc.)

IT professionals have a responsibility to educate employees about the risks of hot spots. Which of the following are risks associated with hot spots? Check all of the boxes that apply.

third-party viewing

unsecured public network

potential for computer hackers

unauthorized use

Answers

Answer:

All of them

Explanation:

got it right on edge 2020

Answer:

All of the above

Explanation:

just do it

Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is either heads or tails. Assume the input is a value greater than 0.

Answers

Answer:

import random

decisions = int(input("How many decisions: "))

for i in range(decisions):

   number = random.randint(0, 1)

   if number == 0:

       print("heads")

   else:

       print("tails")

Explanation:

*The code is in Python.

import the random to be able to generate random numbers

Ask the user to enter the number of decisions

Create a for loop that iterates number of decisions times. For each round; generate a number between 0 and 1 using the randint() method. Check the number. If it is equal to 0, print "heads". Otherwise, print "tails"

The fraction 460/7 is closest to which of the following whole numbers?

Answers

I don’t see any of “the following numbers”

This diagram shows a number of computing devices connected to the Internet with each line representing a direct connection.
What is the MINIMUM number of paths that would need to be broken to prevent Computing Device A from connecting with Computing Device E?
A. 1
B. 2
C. 3
D. 4

Answers

Answer: C

Explanation: Computing Device A is connected using 3 wires, which all lead to multiple different paths of wires. If you break all the wires off of A, it leaves it with no paths to use. However, if you do this with E, there is 4 differents paths connected to it. Since you need the MINIMUM, the answer would be C.

what is a conditional format that displays a horizontal gradient or solid fill indicating the cell's relitive value compared to other selected cells

Answers

Answer:

Data bar

Explanation:

The answer to this question is data bar. Through the use of a day bar we are able to see trends in our data. They are very useful when it comes to visualization of values that are In a range of cells. Now if the bar is longer then the value we are visualizing is definitely higher. And if it is shorterr the value is lower. Several applications like excel has programmes that makes use of data bars especially for statistical purposes.

Java Eclipse Homework JoggerPro
Over a seven day period, a jogger wants to figure out the average number of miles she runs each day.

Use the following information to create the necessary code. You will need to use a loop in this code.

The following variables will need to be of type “double:”
miles, totalMiles, average

Show a title on the screen for the program.
Ask the user if they want to run the program.
If their answer is a capital or a lowercase letter ‘Y’, do the following:
Set totalMiles to 0.
Do seven times (for loop)
{

Show which day (number) you are on and ask for the number of miles for this day.
Add the miles to the total
}

Show the total number of miles
Calculate the average
Show the average mileage with decimals
Use attractive displays and good spacing.
Save your completed code according to your teacher’s directions.

Answers

import java.util.Scanner;

public class JoggerPro {

   public static void main(String[] args) {

       String days[] = {"Monday?", "Tuesday?", "Wednesday?", "Thursday?","Friday?","Saturday?","Sunday?"};

       System.out.println("Welcome to JoggerPro!");

       Scanner myObj = new Scanner(System.in);

       System.out.println("Do you want to continue?");

       String answer = myObj.nextLine();

       if (answer.toLowerCase().equals("y")){

           double totalMiles = 0;

           for (int i =0; i < 7; i++){

               System.out.println(" ");

               System.out.println("How many miles did you jog on " + days[i]);

               double miles = myObj.nextDouble();

               totalMiles += miles;

           }

           double average = totalMiles / 7;

           System.out.println(" ");

           System.out.println("You ran a total of " + totalMiles+ " for the week.");

           System.out.println(" ");

           System.out.println("The average mileage is " + average);

       }

       

   }

   

}

I'm pretty sure this is what you're looking for. I hope this helps!

Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate the risks associated with future investment decisions, and offers his clients real-time information immediately. Which type of data processing is Jason following in the transaction processing system?

A.
online decision support system
B.
online transaction processing
C.
online office support processing
D.
online batch processing
E.
online executive processing

Answers

Answer:

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

Explanation:

The correct answer to this question is online decision support system. Because the decision support systems process the data, evaluate and predict the decision, and helps the decision-makers,  and offer real time information immediately in making the decision in an organization. So the correct answer to this question is the decision supports system.

Why other options are not correct

Because the transaction processing system can only process the transaction and have not the capability to make the decision for the future. Office support processing system support office work, while the batch processing system process the task into the batch without user involvement.   however, online executive processing does not make decisions and offer timely information to decision-makers in an organization.

Using the Multiple-Alternative IFTHENELSE Control structure write the pseudocode to solve the following problem to prepare a contract labor report for heavy equipment operators: The input will contain the employee name, job performed, hours worked per day, and a code. Journeyman employees have a code of J, apprentices a code of A, and casual labor a code of C. The output consists of the employee name, job performed, hours worked, and calculated pay. Journeyman employees receive $20.00 per hour. Apprentices receive $15.00 per hour. Casual Labor receives $10.00 per hour.

Answers

Answer:

The pseudo-code to this question can be defined as follows:

Explanation:

START //start process

//set all the given value  

SET Pay to 0 //use pay variable that sets a value 0

SET Journeyman_Pay_Rate  to 20//use Journeyman_Pay_Rate variable to sets the value 20

SET Apprentices_Pay_Rate to 15//use Apprentices_Pay_Rate variable to sets the value 15  

SET Casual_Pay_Rate to 10//use Casual_Pay_Rate variable to set the value 10

READ name//input value

READ job//input value

READ hours//input value

READ code//input value

IF code is 'J' THEN//use if to check code is 'j'  

  COMPUTE pay AS hours * JOURNEYMAN_PAY_RATE//calculate the value

IF code is 'A' THEN//use if to check code is 'A'

  COMPUTE pay AS hours * APPRENTICES_PAY_RATE//calculate the value

IF code is 'C' THEN//use if to check code is 'C'

  COMPUTE pay AS hours * CASUAL_PAY_RATE//calculate the value

END//end conditions

PRINT name//print value

PRINT job//print value

PRINT code//print value

PRINT Pay//print value

END//end process

What are the operating system roles?

Answers

Answer:

keep track of data,time

its the brain of the computer


What is the Intranet?

Answers

Answer:

a local or restricted communications network, especially a private network created using World Wide Web software.

Explanation:

the intranet is in private Network based on internet standards but only available within a business or other organization.

QUICK!! URGENT!! I'll provide more point if u give me the right code for this specific program. I truly don't understand if statements :( ​

Answers

Answer:

5467373737474737377474747

What is the proper syntax for writing a while loop in Python?

A. Begin the statement with the keyword repeat
B. End the statement with a colon
C. Place the test condition outside of parentheses
D. Use quotation marks around the relational operators

Answers

The proper syntax for while loops in Python are:

while (condition):

   #the code does something

Answer choice B is the only correct option because all while loops end with a colon.

Answer:

End the statement with a colon

Explanation:

I took the test and got it right.

Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate the risks associated with future investment decisions, and offers his clients real-time information immediately. Which type of data processing is Jason following in the transaction processing system?

A.
online decision support system
B.
online transaction processing
C.
online office support processing
D.
online batch processing
E.
online executive processing

Answers

Answer:

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

Explanation:

The correct answer to this question is an online decision support system. Because the decision support systems process the data, evaluate and predict the decision, and helps the decision-makers,  and offer real-time information immediately in making the decision in an organization. So the correct answer to this question is the decision supports system.

Why other options are not correct

Because the transaction processing system can only process the transaction and have not the capability to make the decision for the future. Office support processing system support office work, while the batch processing system process the task into the batch without user involvement.   however, online executive processing does not make decisions and offer timely information to decision-makers in an organization.

Answer: the answer is A.

Explanation: He has to listen to what the people tell him and think about the information he has and make a choice on what to reply with.

Write code that read from variables N and M, multiply these two unsigned 32-bit variables and store the result in Variables P, Q. (

Answers

Answer:

Using C language;

#include <stdio.h>

int main()

{

int N, M;

printf("Please enter two numbers: ");

scanf("%d %d", &N, &M);

int P,Q = N*M;

return 0;

}

Explanation:

The variables N and M are declared and the "scanf" function is used to assign a value to the variables from the input prompt, then the product of N and M are saved to the P and Q variables.

Adjust list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain fewer than 20 integers. Ex: If the input is: 5 30 50 10 70 65 the output is: 20 40 0 60 55 The 5 indicates that there are five values in the list, namely 30, 50, 10, 70, and 65. 10 is the smallest value in the list, so is subtracted from each value in the list. For coding simplicity, follow every output value by a space, including the last one.

Answers

Answer:

I've implemented this program using python

userinput = int(input("Length: "))

mylist = []

mylist.append(userinput)

for i in range(1,userinput+1):

   userinp = int(input("Input: "))

   mylist.append(userinp)

smallval = mylist[1]

for i in range(1,len(mylist)):

   if smallval > mylist[i]:

       smallval = mylist[i]

for i in range(1,len(mylist)):

   mylist[i] = mylist[i] - smallval

for i in range(1,len(mylist)):

   print(mylist[i],end=' ')

Explanation:

I've added the full source program as an attachment where I used comments to explain difficult lines

The program written in python 3 deducts the least from a list of user given integers and prints the output. The program goes thus :

len_input = int(input())

#the number of inputs the user wishes to supply

vals = []

#initialize an empty list to accept the inputs

for i in range(1, len_input +1):

#use a loop to accept the user inputs

num = int(input())

#allow users to take in the inputs

vals.append(num)

#append each value to the list

least =min(vals)

#using the min function, obtain the lowest value from the list

output_vals = []

#initialize an empty list to hold the normalized values

for i in range(len_input):

#loop using a for loop

diff = vals[i] - least

#deduct the minimum value from each element in the list

output_vals.append(diff)

#append the values to the new list.

print(output_vals)

#display the output

A sample run of the program and the script is attached.

Learn more :https://brainly.com/question/14276852

In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buffered c. an asynchronous d. a non-buffered

Answers

Answer:

The correct answer to the question is option C (an asynchronous)

Explanation:

Computer store files in its temporary data storage space so as to facilitate easy retrievals when needed. Cache memory is in the temporary data storage space of the computer, faster than any other system memory so that when the processor requests information from the computer memory after a user place a command, the cache memory makes the information available in a short time when the data are required eliminating delay when ram will have to take time to fetch the data to provide to the processor.

In an asynchronous write, the data are stored in the cache to enable easy retrieval by the computer processor just as the cache is explained above, it allows writing data to the cluster. Asynchronous write also allows control returns to the caller.

Is the flow of power reversible in a cam and follower

Answers

Answer:

No

Explanation:

The Cam and Follower's input movement is rotary, and it's output movement is reciprocating. ... The Cam and Follower's flow of power is not reversible, but it's direction of travel is reversible. Cam and Followers can be found in cam shafts.

For this assignment, you will create flowchart usingFlowgorithm and Pseudocode for the following program example:You are to design a program for Alexander’s Coffee Shopproviding customer research data. When a customer places an order,the clerk asks the customer for their zip code and age. The clerkenters this data as well as the number of items purchased. Theprogram should operate continuously until the clerk enters a 0 forthe zip code at the end of the day. If the clerk enters an invalidage (defined as less than 10 or more than 100), an error message isdisplayed and the program re-prompts the clerk continuously toenter a valid age. At the end of the program, display the averagecustomer age as well as counts of the number of items ordered bycustomers under the age of 25 and customers 25 and older.

Answers

Answer:

The flowchart is attached

Oredered accordinly with the flowcahrt number

Other Questions
Elena is making an open-top box by cutting squares out of the corners of a piece of paper that is 11 inches wide and 17 inches long, and then folding up the sides. If the side lengths of her square cutouts are inches, then the volume of the box is given by V(x)=x(11-2x)(17-2x) Explain why the bottom of the ship is deeper below the surface of the seawhen the ship is fully loaded with cargo How many cells does one gram of yeast contain? Infection of the bone and bone marrow is known as M to the power of 5 n to the power of 3 divided by m to the power of 2 n to the power of -4please solve fast I will mark the first answer as brainliest and give with step by step explanation find the surface area PLEASE HELP QUICKLY: (FIRST ANSWER GETS BRAINLIEST) PERSONAL & FAMILY FINANCEWhat is one statement that economists would say is INCORRECT?Societys resources are limited.People usually put their own interests as their first priority.The stock market only affects people who invest in it. The half life of radon 222 is 3.824 days, how much time must pass of one fourth of a given amount of radon to remain? What is the value of 4(x - 2)(x + 3) + 7(x - 2)(x - 5) - 6(x - 3)(x - 5) when x = 5? A particular plant root grows 3.5 inches per month. How many centimeters is the plant root growing per month? (1 inch = 2.54 centimeters). (2 points)Group of answer choices6.04 centimeters8.89 centimeters1.38 centimeters0.73 centimeters Why does evolutionary theory absolutely require the earth to be veryold? Which of these is a source of pollution caused by humans?A)volcancesB)pesticideslightning strikesD)biological decay What similar challenges did the Spanish, English, and French settlers face during early European colonization of theAmericas?O starvation, disease, and conflicts with Native AmericansOdisease, political issues, and determinationO starvation, knowledge of the land, and reasonable expectationsO cold weather, darkness, and starvation Which of these words best replaces the underlined word?Watch how the wave flings the inner tube.a. tossesb.Floats c.Rolls d. guides 6. What would a+c< 100 mean in this situation?| The zika virus was first identified in Uganda in 1947. The virus is transmitted from person to person by a bite from a mosquito. It is commonly carried by the Aedes mosquito which is prevalent throughout Central Africa. The virus has more recently spread to the Americas (South, Central, and now North) and is expected to spread to Europe. There is a concern that the virus may reach epidemic proportions. Zika virus is related to yellow and dengue fever. Common symptoms are low grade fever and a distinctive skin rash and other symptoms include vomiting, headache, and muscle and/or joint pain. Pregnant women should avoid traveling to areas known to have zika virus present because the virus is known to cause microcephaly and developmental difficulties related to the central nervous system. Based on the paragraph above, class discussions, and other VALID (be careful with your selection of e-materials! CDC Center for Disease Control is a good place to start) sources of information please answer the following questions. State a reason why the virus has spread to the Americas and likely to spread to Europe. Define the term microcephaly. What bones of the fetal skull would be affected by zika? Specifically, what area of the CNS is not fully developed in microcephalic individuals. In 1 -3 sentences describe the developmental difficulties of microcephalic individuals. How does one know if they have contracted zika? Do men need to be concerned about contracting zika? How does one avoid contracting zika? In a short paragraph (2-5 sentences!) provide one example of a scientific measure that could possibly control the spread of zika and explain how the measure works (controls the spread). When a whole number is multiplied by 10to the 5th power, how does the placement of the decimal point change? a It moves five places to the right. b It moves ten places to the right. c It moves five places to the left. d It moves ten places to the left. A line passes through the HELP ME PLEASE point (4, -6) and has a slope of -3/4. Which is the equation of the line?O y=-x-3O y=-x-6O y=-3x-343O y=-6x- What is the slope of the table below? (Pls hurry) PLZ HURRY!! What is the difference between sign language and ASL?A. Sign language is any system of communication using visual gestures and signs, whereas ASL is a specific visual language used by Deaf people in the United States and parts of Canada that uses handshape, movement, and facial expression to convey meaning.B. Sign language is a specific visual language that uses handshape, movement, and facial expression to convey meaning, whereas ASL is any system of communication used by members of the Deaf community in the United States.c. Sign language is any system of communication using visual gestures and signs, whereas ASL is the letters of the English alphabet represented by hand signs.D. Sign language and ASL are the same.