Concept explainers
In Exercises 57 through 64, identify any errors.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
Additional Engineering Textbook Solutions
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Starting Out with Programming Logic and Design (4th Edition)
C How to Program (8th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
C Programming Language
Computer Science: An Overview (12th Edition)
- # Segmentation Questionarrow_forwardfor( ( } total = total + number; Fig. 2 Finish the for loop in Fig. 2. The loop will total the variable number six times. Given: float number; float total; int cnt; Edit View Insert Format Tools Table 12pt ✓ Paragraph v BI U Av ev T² 00 0 EV G ģ :arrow_forwardPythonarrow_forward
- Introduction Some number of teams are participating in a race. You are not told how many teams are participating but you do know that: Each team has a name, which is one of the uppercase letters A-Z. No two teams have the same name, so there are a maximum number of 26 teams. Each team has the same number of members. No two runners cross the finish line at the same time – i.e. there are no ties. At the end of the race we can write the results as a string of characters indicating the order in which runners crossed the finish line. For example: ZZAZAA We can see there were two teams: A and Z. Team A’s runners finished in 3rd, 5th and 6th place. Team Z’s runners finished in 1st, 2nd and 4th place. Scoring the race Each runner is assigned a score equal to their finishing place. In the example above team Z’s runners achieved scores of 1, 2 and 4. Team A’s runners scores were 3, 5, and 6 respectively. The team’s score is the sum of the members score divided by the number of people on…arrow_forwardIn final exam 10 marksarrow_forwardA series of car speed were measured: 20, 30, 35, 40, 45, 55, 60, 60, 70, 75. a) Find mean value b) Find median and mode c) Please provide five-number summary (follow the steps of course slides) d) Draw the boxplot (use MATLAB or Python)arrow_forward
- 11 Worksheet 5 Note:Solution using Matlab Code Write a program that prompts the user to enter a number within the range of 1 through 7, those numbers represent the weekdays as shown in the table. If the entered number is more than 7, display 'invalid day'. Number 1 2 3 4 5 6 7 Day Sunday Monday Tuesday Wednesday Thursday Friday Saturday Type of the day Workday Workday Workday Workday Workday Weekend Weekend The program should continue to repeat itself 10 times, after which, the program should stop. Furthermore, the program should be able to show a message saying if this is a 'workday' or a 'weekend day'. Note: you are required to add a comment beside your command. Hint: to add a comment you may use the % sign. thank guys you dodo great.arrow_forward5. Maximum Occurring Character Given a string, return the character that appears the maximum number of times in the string. The string will contain only ASCII characters, from the ranges ('a'-'z','A'-'Z','0'-'9'), and case matters. If there is a tie in the maximum number of times a character appears in the string, return the character that appears first in the string. Example text = abbbaacc Both 'a' and 'b'occur 3 times in text. Since 'a'occurs earlier, a is the answer. Function Description Complete the function maximum Occurring Character in the editor below. maximumOccurringCharacter has the following parameter: string text: the string to be operated upon Returns char: The most occurring character that appears first in the string. Constraints • 10 ≤ |text| ≤ 104 • All characters are alphanumeric, in the ranges ('a'-'z','A'-'Z','0'-'9') ======== 999992 14 15 16 17 18 19 20 21 2 2 2 2 22 23 24 25 2222 26 class Result { * * Complete the 'maximumOccurring Character' function below. * का…arrow_forwardComputer sciencearrow_forward
- 10. The algorithm shown in Figure 1-13 should calculate and print the gross pay for five workers; however, some of the instructions are missing from the algorithm. Complete the algorithm. If an employee works more than 40 hours, he or she should receive time and one-half for the hours worked over 40. read the employee's name, hours worked, and pay rate calculate gross pay = hours worked times pay rate otherwise, do this: calculate regular pay = pay rate times 40 calculate overtime hours = hours worked minus 40 calculate overtime pay = calculate gross pay = end if print the employee's name and gross pay end repeatarrow_forward9-13. Substring: Complete the following code to check if str2 with length strlen2 is a substring of str1 with length strlen1. Examples: str1=flower, str2=low (low is a substring of flower) str1=flower, str2=law (law is not a substring of flower) Algorithm: 1. Find the first character of str2 in str1. 2. If not found, str2 is not a substring of str1, else compare the remaining characters. 3. If all remaining characters matched, str2 is a substring of str1. Else, str2 is not a substring of strl. cld mov rcx, qword [strlenl] 9. 10. 11. cmp rcx, 0 je not Substring mov rcx, qword [strlen2] dec rcx 12. inc rsi 13. cmp rcx, 0 je substring jmp notSubstringarrow_forwardAny year is entered through the keyboard, write a program to determine whether the year is a leap-year or not. ● Comment/Discussion on the obtained results and discrepancies (if any).arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning