Using the knowledge of computational language in python it is possible to write a code that tries to organize the names in an assorted way and any name can be included.
<h3>Writing code in python:</h3>
<em>names_list = []</em>
<em>for i in range(0, 5):</em>
<em> names_list.append(input("Name: "))</em>
<em>sorted_last_names = sorted([name.split()[-1] for name in names_list])</em>
<em>print(sorted_last_names)</em>
See moer about python at brainly.com/question/18502436
#SPJ1
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.
It will normally result in rules that are more complex and more difficult to understand option (C) is correct.
<h3>What is tail recursion?</h3>
The recursive function is essentially used as the function's final statement in the tail recursion.
If we try to use tail-recursive rules to implement non-tail-recursive rules, it will normally result in rules that are
A. simpler and easier to understand.
B. circular rules.
C. more complex and more difficult to understand.
D. more time-consuming in execution.
The recursive function is essentially used as the function's final statement in the tail recursion. Therefore, tail recursion is what happens when nothing remains to be done after returning from the recursive function.
Thus, if we try to use tail-recursive rules to implement non-tail-recursive rules, it will normally result in rules that are more complex and more difficult to understand option (C) is correct.
Learn more about the tail recursion here
brainly.com/question/20749341
#SPJ4