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
navik [9.2K]
2 years ago
7

In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all

the nonnegative integers from 1 to n. For example: 7! = 1 x 2 x 3 x 4 x 5 x 6 x 7 = 5,040 Write a program that lets the user enter a nonnegative integer and then uses a loop to calculate the factorial of that number. Print the factorial to standard output.
Computers and Technology
1 answer:
hram777 [196]2 years ago
4 0

Answer:

The program to this question can be given as:

Program:

factorial=1 #declare a variable.  

number=int(input("Enter a positive integer:")) #input a number.  

while (number>0): #loop  

   factorial= factorial*number # holding value in factorial variable  

   number=number-1  

print('=',factorial) #print value.

Output:

Enter a positive integer:6  

= 720  

Explanation:

The description of the above python program can be given as:

  • In the above program firstly we define a variable that is "factorial". In this variable, we assign a value that is 1 and it is used to calculate the factorial value.  
  • We define a variable "number". The number variable is used to take input from the user.  
  • Then we define a loop in the loop we calculate the factorial and hold the value in the factorial value in the last we print the value.  

You might be interested in
Open a command prompt on PC1. Issue the command to display the IPv6 settings. Based on the output, would you expect PC1 to be ab
Strike441 [17]

Answer:

yes it can communicate with all interfaces on the router.

Explanation:

PC1 has the right default gateway and is using the link-local address on R1. All connected networks are on the routing table.

Netsh may be a Windows command wont to display and modify the network configuration of a currently running local or remote computer. These activities will tell you in how manny ways we can use the netsh command to configure IPv6 settings.

To use this command :

1. Open prompt .

2. Use ipconfig to display IP address information. Observe the  output whether IPv6 is enabled, you ought to see one or more IPv6 addresses. A typical Windows 7 computer features a Link-local IPv6 Address, an ISATAP tunnel adapter with media disconnected, and a Teredo tunnel adapter. Link-local addresses begin with fe80::/10. ISATAP addresses are specific link-local addresses.  

3. Type netsh interface ipv6 show interfaces and press Enter. note the output listing the interfaces on which IPv6 is enabled. Note that each one netsh parameters could also be abbreviated, as long because the abbreviation may be a unique parameter. netsh interface ipv6 show interfaces could also be entered as netsh  ipv6 sh i.

4. Type netsh interface ipv6 show addresses  Observe the results  of the interface IPv6 addresses.

5. Type netsh interface ipv6 show destinationcache and press Enter. Observe the output of recent IPv6 destinations.

6. Type netsh interface ipv6 show dnsservers and press Enter. Observe the results listing IPv6 DNS server settings.

7. Type netsh interface ipv6 show neighbors and press Enter. Observe the results listing IPv6 neighbors. this is often almost like the IPv4 ARP cache.

8. Type netsh interface ipv6 show route and press Enter. Observe the results listing IPv6 route information.

5 0
3 years ago
If you were given a 3D microscope to use for photography, which object(s) would you most want to photograph?
e-lub [12.9K]
I would like to photograph a rose, because I have always been interested to know more about some flowers and what’s in the inside of them. Even though roses look pretty “simple” but beautiful in <span>the outside, I suspect that there are a thousand of different things inside of it.</span><span />
8 0
3 years ago
Read 2 more answers
What does it mean if my ninja blender power light is blinking?
Dafna11 [192]
It will only blink if the Ninja Blender's top isn't on all the way.
7 0
3 years ago
Read 2 more answers
Hi<br>is it right?<br>"I think there is a small mistake in the quotation(second not first)"​
Molodets [167]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

  The correct option to this question is:

.clr{color:blue;}

I write the complete code of HTML using this CSS style to execute this scenario as given below

<html>

<head>

<style>

.clr

{

color:blue;

}

</style>

</head>

<body>

<a href="pg.html" class="clr">click here</a>

<h2 class="clr">Home</h2>

</body>

</html>

The bold text is a complete code of this question.  When you will run it it will execute a link and Home text on the page in blue color. So the correct option is .clr{color:blue;}

7 0
2 years ago
The four differences between binary and denary​
Andrei [34K]

Explanation:

Binary and denary

A number base indicates how many digits are available within a numerical system. Denary is known as base 10 because there are ten choices of digits between 0 and 9. For binary numbers there are only two possible digits available: 0 or 1. The binary system is also known as base 2.

mark me brainliest please

8 0
3 years ago
Other questions:
  • Molly wants to make some cells in her balance spreadsheet different colors so that she can more quickly find important data. Wha
    13·2 answers
  • ________ is installed into special, read-only memory of devices like printers and print servers or devices used for various type
    13·1 answer
  • Indexed sequential access, an index is more useful when the number of record is
    10·1 answer
  • 1. You can apply CSS formatting in which of the following ways?
    6·1 answer
  • You need to find out how much ram is installed in a system. what command do you execute to launch the system information utility
    12·1 answer
  • Software that helps users to communicate with family, friends and business colleagues by posting personal information, status up
    13·2 answers
  • A website's ____ page provides basic information about the individual or organization and includes a navigation bar with links t
    13·1 answer
  • The intellectual property right that gives a creator control of his or her written work is known as what?
    9·1 answer
  • Write short notes about monitor printer and speaker​
    14·2 answers
  • Read each of the following statements about Computer Science and explain why you think that statement is true.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!