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
lana [24]
3 years ago
7

Write a program that input a number and display its precessor and successor number using function.

Computers and Technology
1 answer:
muminat3 years ago
6 0

Answer:

def ask():

x = int(input("Pick a number: "))

p = x - 1

s = x + 1

print("The predecessor is {} and the successor is {}.".format(p, s))

ask()

Explanation:

"def ask():" and everything indented defines the function and "ask" calls the function.

You might be interested in
In which network zone should a web server be placed?
Cloud [144]

Answer:

DMZs

Explanation:

"That's fine for a small company, but a larger company should consider creating a perimeter security network called a demilitarized zone (DMZ) that separates the internal network from the outside world. DMZs are the best place for your public information."

       - ZDNetwww.zdnet.com › article › dmzs-for-dummies-5000297743

7 0
3 years ago
The greater the profit motive in an economic system , the greater the likelihood of a.Innovation b.Equity c.Security d.Governmen
xxMikexx [17]

Answer:

d. Government controlling the factors of production.

Explanation:

Businesses exist to make profit. There is requirement to provide value for money to the customers in order for a business to achieve success. When a business fails to provide good customer service and exists only to make profits they might fail. In such situation government intervenes to stop the monopoly and save the consumers from the mercy of business.

3 0
3 years ago
Add the following methods to the ArrayCollection class, and create a test driver for each to show that they work correctly. In o
maks197457 [2]

Answer:

Attached are screenshots of the working code - baring in mind this only works on mutable Collection types. (ones that can be changed) if you use Collections that don't support this you may experience an Unsupported Operation Exception - but this is expected.

Explanation:

Using Java streams as an alternative for some answers.

3 0
3 years ago
Before sending a packet into a datagram network, the source must determine all the links that packet will traverse between sourc
Llana [10]

Answer:

False

Explanation:

The transport layer is found in both OSI and TCP/IP suite model. It segments and propagates packets across a network. TCP and UDP are protocols in this layer.

UDP is a connectionless protocol, that is to say, it needs no connection for transmission to take place. UDP transfer is unreliable as packets lost are not retransmitted. Unlike the TCP, it's header is smaller and it is faster in transmission, and links to destinations are random and not determined by the source.

3 0
3 years ago
What is best method for modern businesses to authorize the use of workplace resources to its employees
Reika [66]
<span>Assign them a user authentication and password.</span>
3 0
3 years ago
Read 2 more answers
Other questions:
  • Which type of statement is used to communicate one’s feelings in a nonconfrontational manner?
    14·1 answer
  • You can increase your efficiency by using your e-mail program's spell checker because it eliminates the need for you to proofrea
    11·1 answer
  • Type of file can a user send a technician in order to get help remotely, when using remote assistance
    5·1 answer
  • What risks and safeguards are associated with wireless communication? what is “war driving” or “war flying”? are you comfortable
    14·1 answer
  • âwhen the footer is the last element in a page body, the _____ pseudo-element is used to add a placeholder element after the foo
    8·2 answers
  • You want to install an rodc in your windows server 2003 forest, which currently has all windows server 2003 domain controllers.
    11·1 answer
  • Choose all of the items that represent operating systems largely derived from UNIX. GNU/Linux, Mac OS X, IBM, OS/360, BSD, Windo
    12·2 answers
  • What type of photography is represented by a photograph of a dog on a beach ?
    11·1 answer
  • C. List three obstacles to effective listening.
    8·1 answer
  • If you are going to build a custom fast PC for gaming and you need a lot of storage for big video files and videos, but you have
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!