ENglish00927 ENglish00927
  • 09-07-2020
  • Computers and Technology
contestada

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

Respuesta :

samgirshovich
samgirshovich samgirshovich
  • 14-07-2020

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.

Answer Link

Otras preguntas

A book sold 42,600 copies in its first month of release. Suppose this represents 9.2% of the number of copies sold to date. How many copies have been sold to da
What is the correct chemical name for the following structures pictured below?
Mention the stages of conflict management.​
divide. 6 divided by 2 2/7
please help me i'll rank u brainliestwhat is a real world example of a rational function, and how could you graph it and put it in a table?
Choose the word that best completes each definition. A(n) is an emergency medical technician at a high level of training and expertise, often working from an
Suppose follows the standard normal distribution. Use the calculator provided, or this table, to determine the value of so that the following is true. Carry you
What are some examples of "There is always some good inside of bad." Need at least 3.
What is the correct chemical name for the following structures pictured below?
Donna has a $300 loan through the bank she is charged a simple rate The total interest she paid on the loan was $63 As a percentage what was the annual interest