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
Andrej [43]
3 years ago
9

Complete the function to return the factorial of the parameter,

Computers and Technology
2 answers:
pav-90 [236]3 years ago
6 0

def factorial(number):

   product = 1

   while number > 0:

       product = product * number

       number = number - 1

   return product

strNum = input("Enter a positive integer:")

num = int(strNum)

print(factorial(num))

I hope this helps!

Nastasia [14]3 years ago
4 0

Answer:

def factorial(number):

  product = 1

  while number > 0:

      product = product * number

      number = number - 1

  return product

strNum = input("Enter a positive integer:")

num = int(strNum)

print(factorial(num))

Explanation:

i got it right on edge 2020

You might be interested in
You must keep track of some data. Your options are: (1) A linked-list maintained in sorted order. (2) A linked-list of unsorted
ladessa [460]

Answer:

Question was incomplete and continued the question

For each of the following scenarios, which of these choices would be best? Explain your answer.

BST

Sorted Array

Un-sorted Array

a) The records are guaranteed to arrive already sorted from lowest to highest (i.e., whenever a record is inserted, its key value will always be greater than that of the last record inserted). A total of 1000 inserts will be interspersed with 1000 searches.

b) The records arrive with values having a uniform random distribution (so the BST is likely to be well balanced). 1,000,000 insertions are performed, followed by 10 searches.

Explanation:

Answer for a: Un-sorted array or Un-sorted linked list : as mentioned in the question itself that the records are arriving in the sorted order and search will not be O(log n) and insert will be not be O(n).

Answer for b : Un-sorted array or Un-sorted linkedlist : Number of the items to be inserted is already known which is 1,000,000 but it is very high and at the same time search is low. Unsorted array or Unsorted linked list will be best option here.

7 0
3 years ago
Anyone watch anime, i love stay kids and they sang the op for Tower of God XD
TEA [102]

Answer:

I do Stray kids and Tower Of God is good combo mannnn

6 0
4 years ago
Read 2 more answers
Congress are smart becuase.....
spin [16.1K]

Answer:

If we are talking about government then they are smart bc of there two house policies, both are equal yet super unique. They make sure each state has an equal voice in the senate.

5 0
3 years ago
What may happen if a large number of computer users are trying to access a web site at the same time as you ?
Ber [7]
It Will Say " Too Many People At A Time Trying To Get In " And It Will Say Wait .
6 0
3 years ago
. wireless network adapters differ from regular networkadapters because theycontain………………..
Nataly_w [17]

Answer: Transceivers

Explanation:

 Wireless network adapters differ from regular network adapters because they contain transceivers as, the transceiver is that portion of the network interface which transmitted the data by concerting digital data into the digital signals in the medium. Basically, the network adapter are responsible for connected the host in the network medium and also convert the binary form data.Transceiver signal are basically depends upon the type of the network.

8 0
3 years ago
Other questions:
  • In a relational database, the three basic operations used to develop useful sets of data are:
    10·1 answer
  • When is Hytale coming out?<br><br><br> P.S it might be Mine-craft 2.0<br><br><br> :)
    7·1 answer
  • ________ is a process in which computer software that uses statistical analysis, database technology, and artificial intelligenc
    13·1 answer
  • According to the municipal solid waste report what are the benefits of recycling
    6·1 answer
  • Write a function called factor that determines for a pair of integers whether the second integer is a factor of the first. The f
    11·1 answer
  • PowerPoint displays many that are varied and appealing and give you an excellent start at designing a presentation. However, you
    15·1 answer
  • A ____________ would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a____________
    12·1 answer
  • What connectors are available for components to be connected externally to the motherboard
    12·2 answers
  • ___________ is related to mass, but also includes the gravitational pull of the Earth.
    14·1 answer
  • How r u<br> ;)<br> happy what day is it
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!