Answer:
To tell what will happen when an if-statement is false
Explanation:
We use else statement if if-statement get false.
for example
if(a>20)
{
print "your age is greater than 20"
}
else
{
print "Your age is less than 20"
}
In the pseudo code, you see the use of else statement, that if age is greater than 20 then display message "you are age is greater than 20". if this statement get false, i.e. you are age is not greater than 20 then else statement will be executed and message will be displayed that your age is less than 20.
Why other option are not correct
To input a variable:
to get input, we use input statement of respective programming language not if-else statement.
To end an if statement
we don't use else statement to end if statement. when condition met then if statement will be ended
To handle string value
we use input validation statement to handle if statement.
Write a Qbasic program to read the value of base and height of a triangle and find its area.
Answer:
The program to this question as follows:
Program:
PRINT "Program: Area of Triangle" 'print message
INPUT "Enter base: ", base 'defining the variable base and input value from the user
INPUT "Enter height:",height 'defining variable height and input a value from user
Area=base*height/2 'formula to calculate Area
PRINT "Area of Triangle:", Area 'print Area
Output:
Program: Area of Triangle
Enter base: 2
Enter height: 3
Area of Triangle: 3
Explanation:
In the above Qbasic program, first, a print function is used to print the message. In the next line, the input function is defined, which uses the "base and height" variable for user input.
Then another variable "Area" is defined that uses user input values to calculate the area of a triangle, and also store its calculated value. At the last, the print function is used to print Area variable value
What is the answer of this question
-Calculate the bit rate required for a UHD TV whose picture resolution is 3840 pixels wide by 2160 tall.
Answer:
Dubbed DVB-UHDTV comes with two standards, which are known as UHD-1 (4k) and UHD-2 ( 8k). We are concerned with 3840 x 2160 and that is 4k. It has a frame rate of 60 Hz, and the color depth is 30 bit/pix. So the bit rate = no. of pixels in a frame x frame rate x bit depth
= 3840 x 2160 x 60 x 30 bit/ sec
=14929.92 Mbit/sec.
Explanation:
We need to find the number of bits in a frame, which is frame size x bits per pixel x number of pixels, where bits per pixel is bit depth. And for bit rate, we need to multiply this by frame rate, and the number of frames being processed per second, and which is the frequency. The rest is as explained in the answer section.
What is 8 hours, 5 minutes, 22 seconds minus (-) 7 hours, 24 minutes, 37 seconds?
8 hrs 5 mins 22 secs
- 7 hrs 24 mins 37 secs
————————————
Answer:
Enter time 1 HH:MM:SS8:5:22
Enter time 2 HH:MM:SS7:24:37
0:40:45
Explanation:
The program for above in Python is:
from datetime import datetime
s1 = input("Enter time 1 HH:MM:SS")
s2 = input("Enter time 2 HH:MM:SS")
Format1 = '%H:%M:%S'
tdiff = datetime.strptime(s1, Format1) - datetime.strptime(s2, Format1)
print(tdiff)
We are using the datetime class in datetime module for using strptime to find the difference between the two times.
Write about the hierarchy (highest to lowest) of job opportunities in chosen industry:
Answer:
Suppose you are working in a Software development company. The hierarchy of job opportunities in a given industry is as mentioned in the explanation section.
Explanation:
Board of Directors
Executives
Program Managers
Project Managers
Programmer analyst.
Quality Testing Officer
Team Leader
Senior Software Engineer.
Software Testing Officer.
Software Engineer.
Software developer.
Junior Developer.
So at the top, we have the board of directors. And then comes the Executive officers. Under them are the Program managers, and they look after multiple projects. The Project Manager, however, handles one project at a time. They are followed by a Programmer analyst, and then comes a Quality testing officer. And then comes the Team leader, and there can be several team leaders under a single project Manager. Remember Programmer analyst and Quality test officer are a separate entity altogether. And same is the case with the technical writer who interacts with each of the team members for collecting data so that he can process the data into meaningful information. The team leader heads Senior Software Engineer. Software Testing Officer,Software Engineer, Software developer and Junior Developer. The technical writer remains in close contact with the team leader all the time, and he ensures that all the writing work like SRS, BRD, FRD, Technical specifications, test report document, user manuals, etc are ready on time. The software Engineer ensures that coding is ready on time, and Senior software engineers ensure that the coding is correct. Software developers work on one technology and the Software Engineer covers all technologies. Software test Engineer tests each module. Junior developers pass through the training, and on completion of their training, they become the Software developer. And each one of these are highly in demand. Though, top officials are required in less numbers and subordinates in more numbers, as they need to do more work guided by expert advice of all the top officials. And this way, the team unitedly completes several software projects each year. And the best team completes in maximum number, and with least bugs.