the answer is slide
I took notes off of plato and it quoted word for word
A slide is a visual aid, also known as a single screen of presentation
:) hope this helps
Medicare because it’s like insurance
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.
Answer:
Check the explanation
Explanation:
# Step 1
the first thing to execute will be......
f = open("states.txt")
# Step 2
the second step is......
states = []
for line in f:
states.append(line.strip())
# Step 3:
the third step is to......
for state in sorted(states):
print(state)
f.close()
Answer:
The python function is as follows:
def fact(N):
factorial = 1
for i in range(1,N+1):
factorial = factorial * i
return(factorial)
Explanation:
This line defines the function
def fact(N):
This line initializes the product of 1 to N to 1
factorial = 1
This line iterates through 1 to N
for i in range(1,N+1):
This line calculates the product of 1 to N i.e. factorial
factorial = factorial * i
This line returns the factorial
return(factorial)