Ask Question

Write the pseudocode for a function named timesTen that accepts an Integer argument. When the function is called, it should return the value of its argument multiplied times 10. Write a main module that asks the user to enter a number, call the timesTen function, passing in that number as and argument, receives the return value, and displays the returned value in a user-friendly message.

+2
Answers (1)
  1. 27 August, 12:11
    0
    function timesTen (number):

    return number * 10

    n = int (input ("Enter an integer: "))

    print (str (n) + "x10 is equal to: " + str (timesTen (n)))

    Explanation:

    Pseudocode is the representation of an algorithm. It shows the steps of the algorithm combination of the English and programming language.

    In the pseudocode, we said we will be defining a function called timesTen that takes one parameter and returns the value of its parameter multiplied times 10.

    In the main, we asked the user to enter a number. Then, we called the function with that number, and print the result.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write the pseudocode for a function named timesTen that accepts an Integer argument. When the function is called, it should return the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers