Answer:
Please find the code in the attached file.
Output:
Please find the attached file.
Explanation:
In this code a "num" variable is declared that use while loop that check num value greater than equal to 0.
Inside the loop we input the "num" value from the user-end and use if the value is positive it will define a for loop that calculates the quotient value as integer part, and use the asterisks to print the value.
If input value is negative it print a message that is "Goodbye".
Please find the code link: https://onlinegdb.com/7MN5dYPch2
Answer:
Movie editing and Sound Editing
Explanation:
Gaming tool will not help edit video and audio that the production crew have shot. Media player will simply just play the video and not allow them to edit it. Animation tool isn't useful unless they plan on doing SFX.
Answer:
<em>The programming language in Python is as follows:-</em>
#Prompt user for input string
userinput = input("Enter a string: ")
#Print the last character of the input
print("The last character is "+userinput[-1])
#End of Program
Explanation:
This line is a comment
#Prompt user for input string
This line prompts user for input
userinput = input("Enter a string: ")
This line is also a comment
#Print the last character of the input
This next line prints the last character of the input string; the last character is defined by the index -1
print("The last character is "+userinput[-1])
For effective communication to occur, everyone must trust and respect each other. ... Clear and concise communication will allow your colleagues to understand and then trust you. As a result, there will be more cooperation and less conflict in the workplace.
Answer:
The sum of all positive even values in arr
Explanation:
We have an array named arr holding int values
Inside the method mystery:
Two variables s1 and s2 are initialized as 0
A for loop is created iterating through the arr array. Inside the loop:
num is set to the ith position of the arr (num will hold the each value in arr)
Then, we have an if statement that checks if num is greater than 0 (if it is positive number) and if num mod 2 is equal to 0 (if it is an even number). If these conditions are satisfied, num will be added to the s1 (cumulative sum). If num is less than 0 (if it is a negative number), num will be added to the s2 (cumulative sum).
When the loop is done, the value of s1 and s2 is printed.
As you can see, s1 holds the sum of positive even values in the arr