Computer Science, asked by dibya181088, 9 months ago

Can the following pseudo function be considered as a pure function? function getMeTimeAdded(arg Integer) = currentTime + Integer

Answers

Answered by Tanmay231
0

Answer:

Mark as brainlist

Explanation:

Answered by mad210219
0

Pseudo function

Explanation:

Python:

Num=int(input())

Ans=””

While(Num >0):

       S=Num%10

       Ans+=S

       Num=Num/10

for I in range(len(Ans)):

     print(I,end=” “)

 

         

we calculated everytime the each digit

by taking remainder when it is divided by 10

and we add the digit to a string

string+=digit

after all the digits are added to the string

print the character of string seperated by space

print(I,end=” “)

end=” “

indicates that the element that is printed automatically leaves some space and then the next variable is printed

we can use any end specifier like \n for new line

EXAMPLE:

1234

4 3 2 1 is the output

2)

43765

4 3 7 6 5

3)

942367

9 4 2 3 6 7

4) 98341256

9 8 3 4 1 2 5 6

As output

Each digit separated by space

Similar questions