In Exercises 11 through 16, determine the errors.
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Starting Out with Python (3rd Edition)
Java: An Introduction to Problem Solving and Programming (7th Edition)
Programming in C
Absolute Java (6th Edition)
C How to Program (8th Edition)
- 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_forwardCelebrity problem A celebrity among a group of n people is a person who knows nobody but is known by everybody else. The task is to identify a celebrity by only asking questions to people of the form: ”Do you know him/her?” Solution Select two people from the group given, say, A and B, and ask A whether A knows B. If A knows B, remove A from the remaining people who can be a celebrity; if A doesn’t know B, remove B from this group. Solve the problem recursively for the remaining group of people who can be a celebrity Which design strategy does the following solution use? A-)Decrease-by-a-constant factor algorithm B-)Variable-size-decrease algorithm C-)Decrease-by-a-constant algorithm D-)Divide-and-Conquerarrow_forwardFast pleasearrow_forward
- 14. _____ variables take on values in an experiment. A) Fixed B) Static C) Random D) Denaturedarrow_forwardTask 4 Assume, you have been given a tuple with details about books that won the Good Reads Choice Awards. book_info = ( ("Best Mystery & Thriller","The Silent Patient",68821), ("Best Horror","The Institute", 75717), ("Best History & Biography","The five",31783 ), ("Best Fiction", "The Testaments",98291) Write a Python program that prints the award category, the book name, and its total votes earned as shown below. [Must use Tuple unpacking for printing and need to handle the quotation marks as a part of the output] Output: The Silent Patient won the 'Best Mystery & Thriller' category with 68821 votes The Institute won the 'Best Horror' category with 75717 votes The five won the 'Best History & Biography' category with 31783 votes The Testaments won the 'Best Fiction' category with 98291 votesarrow_forwarduèstion 22 Satisfiability of a Boolean expression means there is a combination of values that make it (true, false) A Moving to another question will save this responsearrow_forward
- Explain every step pleasearrow_forwardQuestion-1 Friend's Party Circle: There are a few friends living in the same area. They have a party every weekend and the place of party change each week. It is always a lifficult task to select a place which is nearest for everyone. They advantage of Computer Science to solve this problem. all decided to take Names of friends are Ahmed, Rehman, Careem, Basit, Dawood, Ghani, and Farid. Ahmed lives at 5 minutes' walk from rehman and at 10 minutes' walk from Careem. Careem lives at 3 minutes' walk from Dawood. Rehman lives at 4 minutes' walk from Basit and 2 minutes' walk from Dawood. Dawood lives at two minutes' walk from Farid. Ghani lives at 2 minutes' walk from Basit. a. If we represent a graph G = V (V, E) in which set of vertices are home of each Friend and an edge represents a path between two homes. Provide the adjacency matrix of directed graph of the graph G. b. In above directed graph G. You are required to devise an algorithm to find all possible paths.arrow_forwardCreate flow chart to print the result of 25 students in a class. Assume that each student has 4 grades. Find the average of the grades. If it is greater than or equal to 50 then display the student is passed otherwise student is failed. Print the result and average for 25 students.arrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning