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
larisa86 [58]
3 years ago
9

Ask the user to enter a number n >= 1. There after the user will enter n-1 distinct integers between 1 and n. Thus, the enter

ed numbers contain all numbers between 1 and n except one. Output the missing number. You are not allowed to use lists. You are also not allowed to use dictionaries or any programming concept more advanced that a loop. The numbers entered can be in any order.
Computers and Technology
1 answer:
snow_tiger [21]3 years ago
3 0

Answer:

Code below

Explanation:

n = int(input('Please enter n: '))#take input n

print('please enter the numbers')#print enter the numbers

total = 0 #intially take total as 0

original_total = 1 #intially take original_total=1

for i in range(2, n+1): #take the range 2 to n+1

total += int(input('Please enter a number: ')) # add total and enter the number

original_total += i

missing = original_total - total #you got missing number original_total - total

print('The missing number is: ' + str(missing)) # print missing number in the given data

You might be interested in
. Why is it important to use Social Media responsibly? ANSWER NOW!!!
Alenkinab [10]

Answer:

Why is social media important? Social media is important because it allows you to reach, nurture, and engage with your target audience — no matter their location. When a business can use social media to connect with its audience, it can use social media to generate brand awareness, leads, sales, and revenue.

5 0
2 years ago
Read 2 more answers
Which of the following is NOT true about a flow chart?
SCORPION-xisa [38]
I think the answer is A
4 0
3 years ago
My dog peed in the house last week
Solnce55 [7]

Answer:

my dog chewed up the couch

Explanation:

5 0
3 years ago
Read 2 more answers
How is abstraction used in a GPS system
ipn [44]
The designs on the map of the GPS system Im would think but can you be more specific?
8 0
3 years ago
Read 2 more answers
In the __________ phase of the SecSDLC, the team studies documents and looks at relevant legal issues that could affect the desi
mina [271]

In the Analysis phase of the SecSDLC, the team studies documents and looks at relevant legal issues that could affect the design of the security solution.

<h3>What is this stage about?</h3>

This is known to be the phases of development where there is  Analysis or one can say requirements gathering and where one has clearly set out problem or project as well as others.

Note that In the Analysis phase of the SecSDLC, the team studies documents and looks at relevant legal issues that could affect the design of the security solution.

Learn more about Analysis phase from

brainly.com/question/13897351

#SPJ1

5 0
2 years ago
Other questions:
  • While visiting a web site during your lunch break, you see a window that states the web site will not operate properly without f
    13·1 answer
  • _____ software can help a company manage security, enforce corporate strategies, and control downloads and content streaming fro
    11·1 answer
  • Write a program that will askthe user to enter the amount of a purchase. The program should thencompute the state and county sal
    5·1 answer
  • What is an identifier? Give an example of an identifier.
    13·1 answer
  • Upon looking out at the
    8·2 answers
  • A digital designer might do computer animation or video games true or false
    13·2 answers
  • In linear​ programming, what are restrictions that limit the degree to which a manager can pursue an​ objective?
    15·1 answer
  • Which of the following statements is NOT true about url extension?
    10·2 answers
  • Which of the following file formats cannot be imported using Get &amp; Transform?
    6·1 answer
  • Which operation is not efficiently supported by heaps?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!