tilacohen
25.07.2019 •
Computers and Technology
14. if b3=10 and d5=8, what would the following function return? if(b3> d5, "closed", d5-b3) * a. "open" b. "closed" c. -2 d. +2
Solved
Show answers
More tips
- A Art and Culture How to Learn Screaming: Step-by-Step Guide for Beginners...
- H Health and Medicine Contraceptive Pills After 35: The Importance Of Choosing The Right Medication...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
- S Style and Beauty How to Make Your Lips Fuller? Ideas and Tips for Beautiful Lips...
- C Computers and Internet How to Learn to Type Fast?...
- A Art and Culture Who Said The Less We Love a Woman, the More She Likes Us ?...
- F Family and Home How to Get Rid of Your Neighbors?...
- S Society and Politics How Could Nobody Know About the Dead Mountaineers?...
Answers on questions: Computers and Technology
- C Computers and Technology Does the main content (mc) of a web page include searchboxes?...
- C Computers and Technology The loyalty of customers to a business is called...
- M Mathematics 6/4,584 how do you do this I don’t get it...
- C Chemistry 25,6g kim loại X (hóa trị II) tác dụng hoàn toàn với HNO3 đặc nóng cho 17,92 lít khí NO2 (đkc). Kim loại X là...
- H History Why was Napoleon willing to sell the Louisiana Territory to the United States?...
- M Mathematics Can someone help me with this...
- H Health Ovaries produce which hormone? a Globulin b Insulin c Testosterone d Estrogen...
- H Health Can someone pls tell me the point of life...
- M Mathematics Jenny s homework was one day late so the teacher deducted 5 points write an integer to represent the lost in poin explain the meaning of zero...
- C Chemistry Help me pretty please !! What did you notice about the location of the first element (blue) and the second element (red)for each substance?...
Ответ:
IF (condition_to_check , return_if_true , return_if_false)
IF function first checks condition. If it is true it returns first result. Otherwise it returns second result.
Condition to check:
B3>D5
After inserting numbers we get:
10>8
This is correct so the first result will be returned.
The given IF function returns "Closed".
Ответ:
Total number of character comparison = 43
Explanation:
Using the Brute force algorithm
The string of n characters is known as text, and the string of m characters is known as the pattern.
From the given information:
The text (n)=THERE_IS_MORE_TO_LIFE_THAN_INCREASING_ITS_SPEED
The pattern (m) = GANDHI
The total no of characters that we have in the text = 47
The total number of characters in pattern = 6
For a brute force algorithm;
Since; the first character of the pattern does not exist in the text, then the number of trials made can be attempted can be expressed as = n – m + 1
= 47 – 6 + 1
= 47 – 5
= 42
Thus; the algorithm will attempt the trial 42 times.
Now, for loop in the algorithm to run 42 times, the G in the pattern will have to align against the for T in the text, and in the last case, it will be aligned against the last space.
On each attempted trial, the algorithm will make one unsuccessful comparison.
However, at the trial at which the G in the pattern Is aligned with the G in the text, there will be two successful comparisons.
Hence, we can calculate the total number of character comparison as follows:
Total number of character comparison =
Total number of character comparison = ( (( 42 – 1) × 1 ) + ( 1 × 2) )
Total number of character comparison = 41 + 2
Total number of character comparison = 43