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
7nadin3 [17]
3 years ago
8

Question 2: Sum of consecutive odd View Past Answers No past answers. Write a program which asks user to enter an integer n, cal

culates the total sum of the consecutive ODD integers from 1 to n (inclusive of n if n is odd) and store in the variable called sum calculates the average value of the consecutive ODD integers from 1 to n and store in the variable called average prints the value of sum and average For example if n = 7, the program will compute 1+3+5+7, sum = 16, average = 4 if n = 6, the program will compute 1+3+5, sum = 9, average = 3
Pls help ya thx(btw this is python)
Computers and Technology
2 answers:
Vikentia [17]3 years ago
6 0

Answer:

number = int(input("Enter number ") )

sum = 0

count = 0

for x in range(1, number+1, 2):

 sum += x

 count += 1

average = sum/count

print("sum = %d"% sum)

print("average = %d"% average)

The range() function conveniently lets you enumerate all odd values from 1 to your number.

svp [43]3 years ago
4 0
Answer:

Step-by-step Explanation:
You might be interested in
What type of object can offer the most effective way to display data and calculations in a presentation?
poizon [28]

This is definitely an opinion, but an excel you can do A and D and just about the same as B also

<u>So i'd say C </u>

8 0
2 years ago
When creating a presentation in Libre Office Impress, where does the editing of slides take place?
kondor19780726 [428]
The Canterbury Tales, written towards the end of the fourteenth century by Geoffrey Chaucer, is considered an estates satire because it effectively criticizes, even to the point of parody, the main social classes of the time. These classes were referred to as the three estates, the church, the nobility, and the peasantry, which for a long time represented the majority of the population.
4 0
3 years ago
patty works at Mcdonald's as a chef. it is her job to make hamburgers as each order arrives on her computer screen. one day patt
il63 [147K]
Angela should make sure the hamburger patty is disposed of and a new one prepared for the hamburger. She should reprimand Patty as what she did is wrong. Patty could well be fired for what she did. It is unsafe and unsanitary to give a customer food that has fallen on the floor. Angela should make sure this never happens again.

4 0
2 years ago
Read 2 more answers
Which of the following goals states a quantifiable outcome of a project?
Ugo [173]

Answer:

An increase in revenue

Explanation:

We cannot predict how much revenue growth we are going to generate, and at what time. And hence, 2 and 3 are not an option here. Also, a TV science show has nothing to do with the quantifiable outcome of a project. And what is true is certainly that there is going to be an increase in revenue, which can certainly predict if we feel work was good and ended with good results. And hence the above option is the correct option for this question.

6 0
3 years ago
Algorithm to print the first 10 odd numbers​
77julia77 [94]

Answer:

I have the code written in c++ but the logic will be the same you just have to change the syntax ( if you're writing different language)

Explanation:

please mark brainliest

4 0
2 years ago
Other questions:
  • Give a big-O estimate for the number of comparisons used by the algorithm that determines the number of 1s in a bit string of le
    9·2 answers
  • Which type of computer network ensures high quality​
    9·1 answer
  • How does virtualization factor into a layered vs. non-layered design discussion?
    14·2 answers
  • How do I mirror cast my smart lg tv?​
    11·1 answer
  • Write a program to create a customer bill for a company. The company sells only five products: TV, DVD player, Remote Controller
    12·1 answer
  • Help please
    13·2 answers
  • The World Health Organization decided that addiction to video games is considered a mental health disorder. Do you agree or disa
    10·1 answer
  • . Write a C++ Code to get a multiline statement Str1 from a user with a ‘$’ as return character (Hint:
    6·1 answer
  • Is Invader Zim gonna come back?
    7·1 answer
  • Are tigers and goldfish related
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!