1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Hitman42 [59]
2 years ago
7

Please help asap

Computers and Technology
1 answer:
NNADVOKAT [17]2 years ago
5 0

Answer:

a. Comparison of if-else and elif:

if else follow as:

If (Condition)

{

In case if condition true, expression in this section executes

}

else

{

In case condition is false, expression in this section executes

}

elif Statement follows as:

If (Condition)

{

In case if condition true, expression in this section executes

}

{

in case, condition is false, move to elif block

elif (Condition)

{

In case elif condition true, expression in this section executes

}

else

{

In case elif condition is false, expression in this section executes

}

}

Explanation:

In if else, program first check the condition in "if statement", if condition is true it move into the body of "if " and execute the expression. If the condition is false it moves to the body of "else" and execute the expression.

elif is another block of condition in If else condition,It works as in "if statement" if the condition is true the program executes the expression of body of "if body". If the condition is false, it moves to another block of "elif", where it again check some other condition found in "elif statement". If the condition of "elif statement" is true it executes the expression of "elif body" otherwise in case of false condition it execute the expression in "else body".

It follows as: if - elif-else

Answer

b. the relational operators

Relation operators are the operators that are need in the expression to establish relationship between different operands of the expression.

Explanation:

In few expressions, their are some operators used to establish or show the relationship between different operands. These operator could be Equal (=), Greater than(>), Less than (<), Greater than equal to (>=) and Less than Equal to (<=).

These operators can be used in conditional statements that are used to check the relationship between operands and values through these operators.

Example

if (a>5)

{

if value of is greater than 5 then body of if will execute.

}

else

{

If value of a is less or equal to 5, this section will execute.

}

You might be interested in
Implement the function charCnt. charCnt is passed in a name of a file and a single character (type char). This function should o
SVEN [57.7K]

Answer:

Answered below

Explanation:

//Program is written in Python programming language

def charCnt( fileName, char){

if not fileName.exists( ):

return sys.exit(1)

else:

openFile = open("$fileName.txt", "r")

readFile = openFile.read( )

fileLength = len (readFile)

count = 0

for character in range(fileLength):

if readFile[character] == char:

count++

openFile.close( )

return count

}

7 0
2 years ago
You just bought a new hard drive for your computer. You plan to use this as a secondary hard drive to store all your UMA files.
Neko [114]
When you get it you need to make Shure the computer knows you have it
4 0
2 years ago
Suppose that sales is a two-dimensional array of 10 rows and 7 columns wherein each component is of the type int , and sum and j
Deffense [45]

According to the given question, sales is a two-dimensional array and contains 10 rows and 7 columns wherein each component is of type integer and the variables sum and j are also of integer type.

<u>Explanation:</u>

In order to find the sum of the elements of the fifth row of sales, the correct piece of code should be:

sum=0;

for(j=0;j<7;j++)

sum=sum+sales[4][j];  

The indexing in an array always starts from zero, therefore, to calculate the sum of the fifth row, the user has to write 4 in the index to point to the fifth row.

3 0
3 years ago
Which of these is NOT an example of an operating system.
Brrunno [24]
D iTunes hope this helps!

4 0
3 years ago
Read 2 more answers
Consider a system consisting of m resources of the same type, being shared by n processes. Resources can be requested and releas
Mama L [17]

Answer:

Explanation:

The system will be deadlock free if the below two conditions holds :

Proof below:

Suppose N = Summation of all Need(i), A = Addition of all Allocation(i), M = Addition of all Max(i). Use contradiction to prove.

Suppose this system isn't deadlock free. If a deadlock state exists, then A = m due to the fact that there's only one kind of resource and resources can be requested and released only one at a time.

Condition B, N + A equals M < m + n. Equals N + m < m + n. And we get N < n. It means that at least one process i that Need(i) = 0.

Condition A, Pi can let out at least 1 resource. So there will be n-1 processes sharing m resources now, Condition a and b still hold. In respect to the argument, No process will wait forever or permanently, so there's no deadlock.

5 0
3 years ago
Other questions:
  • Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than m
    15·1 answer
  • Write the interface (.h file) of a class ContestResult containing: An data member winner of type string, initialized to the empt
    14·1 answer
  • Whats the Sioux City school wifi?
    15·2 answers
  • It is always better to run over and give more information when you are giving a presentation versus quitting on time.
    11·2 answers
  • Recall the problem of finding the number of inversions. As in the text, we are given a sequence of n numbers a1, . . . , an, whi
    8·1 answer
  • What processes can move a solute against its concentration gradient?
    15·1 answer
  • Explain what 10CLS program does and the write the output​
    13·1 answer
  • Write an algorithm to display your name 10 times​
    5·1 answer
  • Which of the following statement is correct ? A . potential difference is measured by ammeter . B . The unit of potential differ
    9·1 answer
  • What does business informWhat does business information management do?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!