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
What’s unique about New Cashierless stores?
Anettt [7]
There’s no cashiers, meaning if you need help you got to figure it out alone.
7 0
3 years ago
"What does the list look like after this code executes?
Marat540 [252]

Answer:

The list created by the split method in Python 3 will be ["red", "orange", ""yellow", "green", "blue"]

Explanation:

In Python 3, the split method takes the input string, in this case is colors = "red,orange,yellow,green,blue", and split it into a list and you can indicate the separator that the method will use.

The general syntax for this method is:

string.split(separator,max)

separator indicates the character that will be used as a delimiter of each list member and the max parameter indicates the maximum number of separations to make.  

Since each color in your string is separated by the character "," the code will make a list in which every color is a separated string.

7 0
3 years ago
The output of a logic gate is 1 when all its inputs are at logic 0. the gate is either
alexira [117]

Answer: NOR or XNOR gate

Explanation:

In NOR gate we get a high value of the output only when its input has a low value. i.e. for 0 and 0 we get a value of 1.

In XNOR gate which is the compliment of the OR gate we get the output as 1 when all the inputs are 0.

5 0
3 years ago
What needs to be increased in order to increase image size and clarity?
bija089 [108]
Is this multiple choice?
7 0
3 years ago
What is stand-alone LDAP server?
FinnZ [79.3K]

Answer:

A stand-alone LDAP server is defined as to remove the load from a server that does multi function tasks. It is more efficient when we use one or more LDAP configurations .

Light weight Directory Access Protocol (LDAP) is a client and server protocol used for accessing directory data. It  helps in reading and editing the directories over IP networks and runs directly over Transmission control protocol and internet protocol used simple string format for transferring of data.

8 0
3 years ago
Other questions:
  • true or false manual handling of materials accounts for the primary source of energy in the workplace
    13·2 answers
  • A disadvantage of ethernet??
    6·1 answer
  • Write a function that iteratively appends random 1's and 0's to an array to form a binary number. The function returns the binar
    13·1 answer
  • How is a ink pen better than a digital pen.
    8·1 answer
  • A vehicle fails an HC emission test at idle and 2,500 rpm, and the engine has an acceleration stumble. The heated oxygen sensor
    15·1 answer
  • Jenny is working on a laptop computer and notices that the computer is not running very fast. She looks and realizes that the la
    15·2 answers
  • _____ are independent and not associated with the marketing efforts of any particular company or brand.​
    9·1 answer
  • What is the first step to apply the line and page breaks options to groups of paragraphs in a Word document?
    10·2 answers
  • Any song recommendations, pls dont say 6ix9ine or lil pump
    5·2 answers
  • Who has played pokemon red, blue, or yellow on the gameboy
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!