Answer:
* The code is in Python
def joinStrings():
join = ""
while True:
str = input("Enter a word or Q to stop: ")
if str == "Q":
break
else:
join = join + " " + str
return join
print(joinStrings())
Explanation:
Create a function called joinStrings
Initialize join variable to hold the strings that will be combined
Create a while loop that stops when user enters "Q". Otherwise, ask the user for a new string and join it to the join variable with a space
When the loop is done, return the join
Call the function and print the result
Answer:
// This program is written in C++ programming language
// Comments are used for explanatory purpose
// Program starts here
#include <iostream>
#include <string>
using namespace std;
// Declare variables
int inputvar;
// Declare output variable as array
int outputvar[32];
// Set a counter for binary array
int i = 0;
while (inputvar > 0) {
// Divide inputvar by 2 and store remainder in outputvar
outputvar[i] = n % 2;
inputvar/=2;
i++; // increment i by 1
}
// End of division
// Prin resulting array in reverse order
for (int j = i - 1; j >= 0; j--) {
cout << outputvar[j];
}
return 0;
}
// End of Program
Answer:
One angle
Explanation:
I have seen several scripts with various directions such as "Close on" "from another angle", etc. And other scripts without such notations. I have seen conflicting comments concerning this practice---Some producers I have contacted say they want this IN the "finished script" they get and others, feel, like I do, that camera angles and lighting and such are up to the director in the production phase. I have also read that Spec Scripts do not have such notations. So what should I include or not, in this respect, in a Spec Script.
Answer:
The algorithm is as follows
1. Start
2. Declare Integer N
3. Input N
4. While N > 0:
4.1 Print(N%10)
4.2 N = N/10
5. Stop
Explanation:
This line starts the algorithm
1. Start
This declares an integer variable
2. Declare Integer N
Here, the program gets user input N
3. Input N
The while iteration begins here and it is repeated as long as N is greater than 0
4. While N > 0:
This calculates and prints N modulus 10; Modulus of 10 gets the individual digit of the input number
4.1 Print(N%10)
This remove the printed digit
4.2 N = N/10
The algorithm ends here
5. Stop
<u>Bonus:</u>
The algorithm in Python is as follows:
<em>n = 102</em>
<em>while n>0:</em>
<em> print(int(n%10))</em>
<em> n= int(n/10)</em>
<em> </em>