+ 2
why wont this work?? how do i use continue
total = 0 #your code goes here human = int(input()) if human < 3: total += 0 if human >= 3: continue total += 1 print(total) i dont know how to put continue in a loop!
12 Answers
+ 9
https://code.sololearn.com/cYc9kCs4Yr17/?ref=app
Travisthenics ,
Continue statement is used to stop the current iteration and it will continue the next iteration...I did little modification to your code
In the code if you input less than 3
The output will be 0
And if you input 3 and more than 3
The loop runs and you can see it will miss 2 in the output since I use continue if total ==2
Hope you understand..
+ 7
Travisthenics , this code
gets only one input but the question takes n inputs
So ages must be taken using for loop
+ 6
Travisthenics ,
What is the task?
Can you elaborate the question ?
+ 1
@riya
thanks yes i do understand what you said but how can i make the numbers not go up to 100s and 100s
+ 1
Travisthenics just use the for loop
0
Analyze Height Data
Lasaad Awewi
heights = [189, 170, 189, 163, 183, 171, 185, 168, 173, 183, 173, 173, 175, 178, 183, 193, 178, 173, 174, 183, 183, 180, 168, 180, 170, 178, 182, 180, 183, 178, 182, 188, 175, 179, 183, 193, 182, 183, 177, 185, 188, 188, 182, 185, 191]
Here are a few ideas for what you could do with this list of heights:
Calculate some summary statistics: You could find the mean, median, mode, standard deviation, and other measures of central tendency and dispersion to get a sense of what the typical height is and how much heights vary in this group.
Visualize the data: You could create a histogram or box plot to visualize the distribution of heights in this group. This can help you see patterns and identify outliers more easily.
Analy
Compare to a reference group: If you have data on the heights of a reference group, such as the general population, you could compare the two groups and see if there are any significant differences between them.
These are just a few ideas, and there are
0
ššššššš indentation honestly
0
Yhgyh
- 1
maybe try correcting the indentation