For loop asking for user input 1-100 [closed]











up vote
-6
down vote

favorite












I need to create a script using a for loop asking for papers to be graded 1-100.



then average the scores of however many papers are being graded.










share|improve this question















closed as too broad by Scott, RalfFriedl, Thomas, Jeff Schaller, mosvy Nov 27 at 13:37


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    the only way anyone can help with your assignment is if you have done some work yourself, otherwise you are just asking someone to do your work for you .... what will you learn if someone does the assignment for you? ............ if you have written some code, please post it with an explanation of where you are stuck
    – jsotola
    Nov 27 at 5:15












  • i dont even know where to start...i did a while loop for one idk if i can go off that at all
    – bren
    Nov 27 at 10:10










  • #!/bin/bash set -x count=0 papers=0 score=0 grade=0 average=0 read -p " How many papers would you like to grade? " papers while [ $count -lt $papers ] do read -p " Please enter a score " grade score=expr $score + $grade count=$((count + 1)) done average=expr $score / $papers echo $average
    – bren
    Nov 27 at 10:13










  • please add the code to the question above ... select all the code and click the {} button so that it is displayed as code on gray background ...... delete the comment afterward
    – jsotola
    Nov 28 at 7:21










  • i have an answer, but i cannot make statements about code that is not in the question
    – jsotola
    Nov 29 at 1:18















up vote
-6
down vote

favorite












I need to create a script using a for loop asking for papers to be graded 1-100.



then average the scores of however many papers are being graded.










share|improve this question















closed as too broad by Scott, RalfFriedl, Thomas, Jeff Schaller, mosvy Nov 27 at 13:37


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 2




    the only way anyone can help with your assignment is if you have done some work yourself, otherwise you are just asking someone to do your work for you .... what will you learn if someone does the assignment for you? ............ if you have written some code, please post it with an explanation of where you are stuck
    – jsotola
    Nov 27 at 5:15












  • i dont even know where to start...i did a while loop for one idk if i can go off that at all
    – bren
    Nov 27 at 10:10










  • #!/bin/bash set -x count=0 papers=0 score=0 grade=0 average=0 read -p " How many papers would you like to grade? " papers while [ $count -lt $papers ] do read -p " Please enter a score " grade score=expr $score + $grade count=$((count + 1)) done average=expr $score / $papers echo $average
    – bren
    Nov 27 at 10:13










  • please add the code to the question above ... select all the code and click the {} button so that it is displayed as code on gray background ...... delete the comment afterward
    – jsotola
    Nov 28 at 7:21










  • i have an answer, but i cannot make statements about code that is not in the question
    – jsotola
    Nov 29 at 1:18













up vote
-6
down vote

favorite









up vote
-6
down vote

favorite











I need to create a script using a for loop asking for papers to be graded 1-100.



then average the scores of however many papers are being graded.










share|improve this question















I need to create a script using a for loop asking for papers to be graded 1-100.



then average the scores of however many papers are being graded.







shell-script shell






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 at 21:18









Rui F Ribeiro

38.4k1477127




38.4k1477127










asked Nov 27 at 4:35









bren

12




12




closed as too broad by Scott, RalfFriedl, Thomas, Jeff Schaller, mosvy Nov 27 at 13:37


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by Scott, RalfFriedl, Thomas, Jeff Schaller, mosvy Nov 27 at 13:37


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 2




    the only way anyone can help with your assignment is if you have done some work yourself, otherwise you are just asking someone to do your work for you .... what will you learn if someone does the assignment for you? ............ if you have written some code, please post it with an explanation of where you are stuck
    – jsotola
    Nov 27 at 5:15












  • i dont even know where to start...i did a while loop for one idk if i can go off that at all
    – bren
    Nov 27 at 10:10










  • #!/bin/bash set -x count=0 papers=0 score=0 grade=0 average=0 read -p " How many papers would you like to grade? " papers while [ $count -lt $papers ] do read -p " Please enter a score " grade score=expr $score + $grade count=$((count + 1)) done average=expr $score / $papers echo $average
    – bren
    Nov 27 at 10:13










  • please add the code to the question above ... select all the code and click the {} button so that it is displayed as code on gray background ...... delete the comment afterward
    – jsotola
    Nov 28 at 7:21










  • i have an answer, but i cannot make statements about code that is not in the question
    – jsotola
    Nov 29 at 1:18














  • 2




    the only way anyone can help with your assignment is if you have done some work yourself, otherwise you are just asking someone to do your work for you .... what will you learn if someone does the assignment for you? ............ if you have written some code, please post it with an explanation of where you are stuck
    – jsotola
    Nov 27 at 5:15












  • i dont even know where to start...i did a while loop for one idk if i can go off that at all
    – bren
    Nov 27 at 10:10










  • #!/bin/bash set -x count=0 papers=0 score=0 grade=0 average=0 read -p " How many papers would you like to grade? " papers while [ $count -lt $papers ] do read -p " Please enter a score " grade score=expr $score + $grade count=$((count + 1)) done average=expr $score / $papers echo $average
    – bren
    Nov 27 at 10:13










  • please add the code to the question above ... select all the code and click the {} button so that it is displayed as code on gray background ...... delete the comment afterward
    – jsotola
    Nov 28 at 7:21










  • i have an answer, but i cannot make statements about code that is not in the question
    – jsotola
    Nov 29 at 1:18








2




2




the only way anyone can help with your assignment is if you have done some work yourself, otherwise you are just asking someone to do your work for you .... what will you learn if someone does the assignment for you? ............ if you have written some code, please post it with an explanation of where you are stuck
– jsotola
Nov 27 at 5:15






the only way anyone can help with your assignment is if you have done some work yourself, otherwise you are just asking someone to do your work for you .... what will you learn if someone does the assignment for you? ............ if you have written some code, please post it with an explanation of where you are stuck
– jsotola
Nov 27 at 5:15














i dont even know where to start...i did a while loop for one idk if i can go off that at all
– bren
Nov 27 at 10:10




i dont even know where to start...i did a while loop for one idk if i can go off that at all
– bren
Nov 27 at 10:10












#!/bin/bash set -x count=0 papers=0 score=0 grade=0 average=0 read -p " How many papers would you like to grade? " papers while [ $count -lt $papers ] do read -p " Please enter a score " grade score=expr $score + $grade count=$((count + 1)) done average=expr $score / $papers echo $average
– bren
Nov 27 at 10:13




#!/bin/bash set -x count=0 papers=0 score=0 grade=0 average=0 read -p " How many papers would you like to grade? " papers while [ $count -lt $papers ] do read -p " Please enter a score " grade score=expr $score + $grade count=$((count + 1)) done average=expr $score / $papers echo $average
– bren
Nov 27 at 10:13












please add the code to the question above ... select all the code and click the {} button so that it is displayed as code on gray background ...... delete the comment afterward
– jsotola
Nov 28 at 7:21




please add the code to the question above ... select all the code and click the {} button so that it is displayed as code on gray background ...... delete the comment afterward
– jsotola
Nov 28 at 7:21












i have an answer, but i cannot make statements about code that is not in the question
– jsotola
Nov 29 at 1:18




i have an answer, but i cannot make statements about code that is not in the question
– jsotola
Nov 29 at 1:18















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Morgemoulin

Scott Moir

Souastre