- 2

Make an algorithm that reads several numbers and tells you how many of those numbers between 100 and 200 were entered. When the

Could someone answer for me??

21st Apr 2022, 3:09 PM
Luis Gonzaga 神
Luis Gonzaga 神 - avatar
7 Réponses
+ 3
Attempts?
21st Apr 2022, 3:16 PM
A͢J
A͢J - avatar
+ 2
Ervis Meta - SoloHelper , Luis Gonzaga 神 ( not to blame you or anyone else!) i personally believe that we should not post codes like it is done here. the asker is a beginner, and the one-liner does not help in any manner. here are some hints, how the task could be solved in a very basic way: - we don't know how the numbers have to be input, but the result of the input process should be a list with integer numbers - we need a variable that will be used to count the numbers (that are in the desired range) - we use a for loop to iterate over the list of input numbers - check if the current number of the loop variable is in the desired range - if yes, increment the counter variable - when the loop is terminated, we can print the counter variable happy coding!
21st Apr 2022, 4:41 PM
Lothar
Lothar - avatar
+ 2
Luis Gonzaga 神 , we have given you some hints how this task can be solved. if this does not help you, you may repeat some parts of the tutorial. after this, you may be able to do a try. if you get stuck somewhere, link your code here so that we can help you. but we are not giving ready-made codes, because this is not really helpful for your learning progress. happy coding!
21st Apr 2022, 5:53 PM
Lothar
Lothar - avatar
+ 1
I already understand this app and intended for posting questions not codes. A thousand apologies for the misunderstanding!
21st Apr 2022, 6:02 PM
Luis Gonzaga 神
Luis Gonzaga 神 - avatar
+ 1
When trying to write a code to solve a problem, i think it is helpful to write a pseudocode…similar to what Lothar commented. Dont focus on correct syntax, but gather the coding concepts in the order the program should follow… Get numerical input For each number in the input, check if it is >= 100 and <= 200 (if you want to include the ranges) Etc.
22nd Apr 2022, 12:28 PM
Andrew Johnson
Andrew Johnson - avatar
0
# first of all: attempts # second: do not call youself human trash # third: please have will to learn and atempt to solve problems like this one # forth: spend a bit of time expandind this: print(len(tuple(filter(lambda x: 100<=x<=200,map(int,input('~>').split())))))
21st Apr 2022, 4:29 PM
Ervis Meta
Ervis Meta - avatar
0
So how do I find the code for my question?
21st Apr 2022, 5:38 PM
Luis Gonzaga 神
Luis Gonzaga 神 - avatar