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
saul85 [17]
3 years ago
11

function summedValue = SummationWithLoop(userNum) % Summation of all values from 1 to userNum summedValue = 0; i = 1; % Write a

while loop that assigns summedValue with the % sum of all values from 1 to userNum end
Engineering
1 answer:
Alexeev081 [22]3 years ago
8 0

Answer:

function summedValue = SummationWithLoop(userNum)

% Summation of all values from 1 to userNum

  summedValue = 0;

  i = 0;

  % use a while loop that assigns summedValue with the

  % sum of all values from 1 to userNum

  while(i <= userNum)

      summedValue = summedValue + i;

      i = i + 1;

  end

end

You might be interested in
4.10.1: Simon says. "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user mu
AleksandrR [38]

Answer:

for  i  in range(0,10):

   if SimonPattern[i] == UserPattern[i]:

       score = score + 1

       i = i + 1

   else:

       break

if i == 9:

   score = score + 1    

print("Total Score: {}".format(score))

Explanation:

This for loop was made using Python. Full code attached.

  • For loop requires a range of numbers to define the end points. For this Simon Says game, we are talking about 10 characters, so that must be the range for the for loop: from 0 to 10.
  • Conditional if  tests if Simon pattern matches User's one characheter by one and add point for each match.
  • Break statement is ready to escape the for loop at first mismatch.
  • As we are starting from index 0, if the users matched all the characters correctly, then we need to add 1, otherwise the maximun score would be 9 and it should be 10.
Download txt
5 0
3 years ago
Lockheed Martin Skunk Works designs and produces aircraft for defense using rapid prototyping tools
Leni [432]
Answer true


Explanation
4 0
3 years ago
A heat pump cycle is used to maintain the interior of a building at 15°C. At steady state, the heat pump receives energy by heat
Hoochie [10]

Answer:

a) Ql=33120000 kJ

b) COP = 5.6

c) COPreversible= 29.3

Explanation:

a) of the attached figure we have:

HP is heat pump, W is the work supplied, Th is the higher temperature, Tl is the low temperature, Ql is heat supplied and Qh is the heat rejected. The worj is:

W=Qh-Ql

Ql=Qh-W

where W=2000 kWh

Qh=120000 kJ/h

Q_{l}=14days(\frac{24 h}{1 day})(\frac{120000 kJ}{1 h})-2000 kWh(\frac{3600 s}{1 h})=33120000 kJ

b) The coefficient of performance is:

COP=\frac{Q_{h} }{W}=\frac{120000 kJ/h*14(\frac{24 h}{1 day}) }{2000 kWh(\frac{3600 s}{1 h}) } = 5.6

c) The coefficient of performance of a reversible heat pump is:

COP_{reversible}=\frac{T_{h} }{T_{h}-T_{l}  }

Th=20+273=293 K

Tl=10+273=283K

Replacing:

COP_{reversible}=\frac{293}{293-283}=29.3

4 0
3 years ago
What are the Basic requirements of drinking Water ?
iragen [17]

Answer:

1) free of contaminants, 2) alkaline, and 3) micro-clustered

Explanation:

Hope it helps you

4 0
2 years ago
What is the purpose of O-ring and valve seals in a cylinder head?
Andrews [41]

Answer:

its to show the shape is flat and only flat at the botom and top and you can set it up ther way and it wlll still look the same.

Explanation:

8 0
2 years ago
Other questions:
  • You find a publication from a research laboratory that identifies a new catalyst for ammonia synthesis. The article contains the
    6·1 answer
  • With 64 KB of memory and 8 bits in each memory location, how wide should the address bus be to access all 64 KB of memory? (k =
    11·1 answer
  • Assume that price is an integer variable whose value is the price (in US currency) in cents of an item. Assuming the item is pai
    11·1 answer
  • What are the two most important things to remember when at the end of your interview?
    6·1 answer
  • In a four bar mechanism, L, is a fixed link; L2 is driver crank; L3 is coupler and L4 is follower crank. L=27 cm, L3 =5 cm and L
    5·1 answer
  • What is Euler's equation?
    6·1 answer
  • A common rule of thumb for controller discretization is to have "6 samples per rise time" in order to achieve a reasonable appro
    9·1 answer
  • Steam in a heating system flows through tubes whose outer diameter is 5 cm and whose walls are maintained at a temperature of 19
    13·1 answer
  • The ruler game, HELPPPP PLS
    11·2 answers
  • If you’re still enrolled in school, but are looking for a job, on your resume you should highlight:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!