Questions
For the following infix expression, build the corresponding expression tree. 1.1 a*b 1.2 a+b*c 1.3 a+b*c/d-e...

For the following infix expression, build the corresponding expression tree.

1.1 a*b

1.2 a+b*c

1.3 a+b*c/d-e

Perform pre-order and post-order traversal of the above binary expression trees. What relationship exists among these scans and prefix and postfix notation for the expression?

In: Computer Science

Given a number n, what is the largest gap between successive primes which are less than...

Given a number n, what is the largest gap between successive primes which are less than number n?

For example, if n = 12, the prime numbers less than 12 are: [2, 3, 5, 7, 11]. The largest gap between any two prime numbers in this list is 4, so the function would return '4'. >>>print(largestGap(12))

4

Write Python code to solve this problem, and include the following 3 test cases in your answer.

>>>print(largestGap(100))

8

>>>print(largestGap(1000))

20

>>>print(largestGap(10000))

36

In: Computer Science

1. Write a program that read a sequence of positive integer inputs and print the sum...

1. Write a program that read a sequence of positive integer inputs and print the sum and average of the inputs. Assume that the user always enters a positive number (integer) as an input value or an empty space as a sentinel value. Please use the below to test your code [45 points]:

Enter an int value or empty string to end: 98

Enter an int value or empty string to end: 78

Enter an int value or empty string to end: 77

Enter an int value or empty string to end: 1

Enter an int value or empty string to end: 10

Enter an int value or empty string to end:

Sum: 264 Average: 52.8

2. Write a program that read a sequence of positive integers and print the number of odd inputs entered by the user. The sentinel value is an empty string. Use the following test case [48 points]:

Enter integer or empty string to end: 3

Enter integer or empty string to end: 2

Enter integer or empty string to end: 10

Enter integer or empty string to end: 5

Enter integer or empty string to end: 6

Enter integer or empty string to end: 7

Enter integer or empty string to end:

number of odd integers entered: 3

3.Write a program that read a sequence of positive integers and print the average value of all the odd integers entered by the user (hint: you need to compute the sum of all the odd integers first to calculate the average). Use the following test case [7 points]:

Enter an int value or empty string to end: 10

Enter an int value or empty string to end: 20

Enter an int value or empty string to end: 5

Enter an int value or empty string to end: 10

Enter an int value or empty string to end: 15

Enter an int value or empty string to end:

average : 10.0

use python code for all questions

In: Computer Science

Determine a suitable process model for the following projects. Also, you are required to provide a...

Determine a suitable process model for the following projects. Also, you are required to provide a short justification along with the necessary assumptions

d) An enterprise software system where the stakeholders do not well understand requirements. Thus, requirements are expected to be extremely changeable due to external changes, changing expectations, changes in the budget and the rapid change in technology.
e) Children learning mobile application. The stakeholders are concerned about the user interface more than the functionality of the application.

In: Computer Science

Identify a wireless threat and how to mitigate it. Need 300 words Don't rewrite already existing...

Identify a wireless threat and how to mitigate it.

Need 300 words Don't rewrite already existing answers

In: Computer Science

Answer the following questions about Windows registry: 1) Name at least four actions that trigger automatic...

Answer the following questions about Windows registry:

1) Name at least four actions that trigger automatic registry changes.

2) Describe an indirect method of backing up the registry that backs up much more, as it creates a snapshot of the Windows installation minus the user's data. This also occurs on a regular basis by default in Windows.

3) In your own words define the Windows registry.

4) Describe the locations in Windows 10 of the options referred to in this chapter as user options and power options, comparing their location to where they were found in Windows 7.

5) Describe and compare Sleep and Hibernate.

6) Describe a safe method to modify the system startup settings for Windows.

7) Describe plug-and-play.

8) Your computer will not boot up normally and boots into Safe Mode. You suspect the problem is with a new device you installed. What utility should you open in Safe Mode and what should you look for?

9) What does it usually mean when Device Manager puts a device under a type node named "Other Devices?"

10) What will occur after you install a compatible driver for a device previously classified by Device Manager under Other devices?

In: Computer Science

write code data structure using  c language You will build a system to manage patients’ data in...

write code data structure using  c language

You will build a system to manage patients’ data in a hospital. The hospital patient management system stores specific information in the form of health record to keep track of the patients’ data. Your program should read the information from a file called “patients.txt” that should be on the following format

: Patient Name#Gender#Date of admission#Date of birth #Illness#Address (City)#Blood type

Your program should be able to do the following tasks: Options: 1. Read data: read the data of the patients from the file.

2. Create linked list: create a linked list.

3. Sort data: use Radix sort to sort the data based on the patients’ names.

4. Add patient: add a new patient.

5. Update patient: update patient’s information.

6. Delete patient: soft delete (explained below).

7. Search for patients a. Name b. Date of birth

8. List patients a. All patients b. Category (i.e., illness) c. City d. Discharged (Patients who were deleted from the system)

9. Export medical report: export XML file following medial health record standards.

10. Exit: exit from the system and store the information back to the file.

you are not allowed to use the String library functions.

In: Computer Science

Write a case study of array used in scientific calculations and perform any one of the...

Write a case study of array used in scientific calculations and perform any one of the scientific calculation using array.

write it for me please.
i need the answer

In: Computer Science

What questions would you ask of this business owner to determine the strategy for developing the...


What questions would you ask of this business owner to determine the strategy for developing the application?

How would you conceive the project in terms of stages based on the life-cycle of ASP.NET?

What are the immeidate challenges to this project's success?

In: Computer Science

Think a Number Bob and Alice play a game in which Bob gives Alice a challenge...

Think a Number Bob and Alice play a game in which Bob gives Alice a challenge to think of any number M between 1 to N. Bob then tells Alice a number X. Alice has to confirm whether X is greater or smaller than number M or equal to number M. This continues till Bob finds the number correctly. Your task is to find the maximum number of attempts Bob needs to guess the number thought of by Alice

In: Computer Science

Give a research paper on below topic "Does digital economy leads to sustainable use of our...

Give a research paper on below topic "Does digital economy leads to sustainable use of our resources ?" [ This is a research paper for master level please provide the detail i need atlease 85 marks out of 100]

In: Computer Science

Import the northwind database and write sql statements for the following: List all supplier ids (no...

Import the northwind database and write sql statements for the following:

  1. List all supplier ids (no duplicates) for all products.
  2. List the product name and supplier id for all products that cost more than $20.
  3. List all products whose names start with letter "c" and are not discontinued.
  4. List each country name and the number of suppliers located in the country.
  5. List all supplier names, the number of products that each supplier provides (this column should be named as NumOfProducts), and the average price for the products provided by the same supplier (this column should be named as AvgPrice).
  6. Find all suppliers' name, city, and country for those who provide non-discontinued products.
  7. List all supplier names who provide at least two different products.
  8. Add a new product record to the products table. You must provide values for the following fields in the new product record: ProductID, productName, SupplierID, and CategoryID.
  9. Increase the reorder level by 20% and reduce the prices by 10% for all products
  10. Delete discontinued products.

In: Computer Science

6.40 LAB: Warm up: Text analyzer & modifier (1) Prompt the user to enter a string...

6.40 LAB: Warm up: Text analyzer & modifier (1) Prompt the user to enter a string of their choosing. Output the string. (1 pt) Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself. (2) Complete the GetNumOfCharacters() function, which returns the number of characters in the user's string. We encourage you to use a for loop in this function. (2 pts) (3) In main(), call the GetNumOfCharacters() function and then output the returned result. (1 pt) (4) Implement the OutputWithoutWhitespace() function. OutputWithoutWhitespace() outputs the string's characters except for whitespace (spaces, tabs). Note: A tab is '\t'. Call the OutputWithoutWhitespace() function in main(). (2 pts) Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself. Number of characters: 46 String with no whitespace: Theonlythingwehavetofearisfearitself.

In C++ Please

layout given

#include <iostream>

#include <string>

using namespace std;

//Returns the number of characters in usrStr

int GetNumOfCharacters(const string usrStr) {

/* Type your code here. */

}

int main() {

/* Type your code here. */

return 0;

}

In: Computer Science

Describe the major steps for a CPU to execute a procedure call. Specify when BL and...

Describe the major steps for a CPU to execute a procedure call. Specify when BL and BR instructions will be executed, respectively.

Explain how inline function can improve the software performance, and when it should be used.

In: Computer Science

Implement the following function in the PyDev module functions.py and test it from a PyDev module...

Implement the following function in the PyDev module functions.py and test it from a PyDev module named :

def is_divisible(n, i, j):
    """
    -------------------------------------------------------
    Determines if n is evenly divisible by both i and j.
    Use: result = is_divisible(n, i, j)
    -------------------------------------------------------
    Parameters:
        n - the number to check for divisibility (int)
        i - one of the values to divide n by (int)
        j - another value to divide n by (int)
    Returns:
        result - True if n is evenly divisible by both
            i and j, False otherwise (boolean)
    ------------------------------------------------------
    """

Sample testing:

Enter number to check for divisibility: 15
Enter first value to divide by: 3
Enter second value to divide by: 5

15 is evenly divisible by 3 and 5.
Enter number to check for divisibility: 16
Enter first value to divide by: 4
Enter second value to divide by: 3

16 is not evenly divisible by 4 and 3.

In: Computer Science