Write Program Visual C Program Named Checkmonth Prompts User Enter Birth Month Value Enter Q43815068

Write a program in visual c# program named CheckMonth thatprompts a user to enter a birth month. If the value entered isgreater than 12 or less than 1, display an error message;otherwise, display the valid month with a message such as 3 is avalid month.

Expert Answer


Answer to Write a program in visual c# program named CheckMonth that prompts a user to enter a birth month. If the value entered i…

Write Program Whose Input Binary Tree T Necessarily Binary Search Tree Content Node T Inte Q43809979(1)

Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node of T

Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node of T is an integer number. The program should print the sum of contents that are even. Hint: This is a minor modification of the algorithm computing the sum of elements of the tree algorithms. Show transcribed image text Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node of T is an integer number. The program should print the sum of contents that are even. Hint: This is a minor modification of the algorithm computing the sum of elements of the tree algorithms.

Expert Answer


Answer to Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node…

Write Program Whose Input Binary Tree T Necessarily Binary Search Tree Content Node T Inte Q43809979

Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node of T

Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node of T is an integer number. The program should print the sum of contents that are even. Hint: This is a minor modification of the algorithm computing the sum of elements of the tree algorithms. Show transcribed image text Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node of T is an integer number. The program should print the sum of contents that are even. Hint: This is a minor modification of the algorithm computing the sum of elements of the tree algorithms.

Expert Answer


Answer to Write a program whose input is a binary tree T (not necessarily a binary search tree) such that the content of each node…

Write Programming Java Prints Sum Cubes Prompt Read Two Integer Values User Print Sum Valu Q43903141

Write a programming java that prints the sum of cubes. Promptfor and read two integer values from the user and print the sum

of each value raised to the third power, i.e., ( 3+ 3). Sampleoutput:

(user input)

Enter x as an int:

3

Enter y as an int:

4

(3^3) + (4^3) = 91

Expert Answer


Answer to Write a programming java that prints the sum of cubes. Prompt for and read two integer values from the user and print th…

Write Programs Reads String Keyboard Program Construct Url Http Wwwxcom Replacing X String Q43869855

Write a programs that reads a String from the keyboard. Theprogram should then construct a URL for http://www.X.com/ replacingX with the String read in, and print the first five lines of thewebsite in reduce order. An example, fifth, fourth, third, second,first. Use the println method to print each of the 5 lines

Expert Answer


Answer to Write a programs that reads a String from the keyboard. The program should then construct a URL for http://www.X.com/ re…

Write Pseudo Code Description Function Reverses Array N Integers Numbers Listed Opposite O Q43897691

Write a pseudo-code description of a function that reverses anarray A of n integers, so that the numbers are listed in theopposite order than they were before, and determine the runningtime T(n) for the algorithm.

Expert Answer


Answer to Write a pseudo-code description of a function that reverses an array A of n integers, so that the numbers are listed in …

Write Pseudocode Algorithm Counts Number Inversions Array Algorithm Must N2 Worst Case Tim Q43863220

Write the pseudocode for a algorithm that counts the number of inversions in an array. Your algorithm must have (N2) worst-ca

Write the pseudocode for a algorithm that counts the number of inversions in an array. Your algorithm must have (N2) worst-case time complexity. Explain why your algorithm has O(N2) worst-case time complexity. What is the space complexity (auxiliary space) of this algorithm? (As explained in section 5.3 of the black book, “two indices i < j form an inversion (in the list A] if ai > aj”, where ai, a; E A). If you wish, you may specify whether you are using zero-based indexing or one-based indexing. Show transcribed image text Write the pseudocode for a algorithm that counts the number of inversions in an array. Your algorithm must have (N2) worst-case time complexity. Explain why your algorithm has O(N2) worst-case time complexity. What is the space complexity (auxiliary space) of this algorithm? (As explained in section 5.3 of the black book, “two indices i aj”, where ai, a; E A). If you wish, you may specify whether you are using zero-based indexing or one-based indexing.

Expert Answer


Answer to Write the pseudocode for a algorithm that counts the number of inversions in an array. Your algorithm must have (N2) wor…

Write Pseudocode Function Checks Given Matching Stable Matching Function Take Argument Mat Q43860265

Write the pseudocode for a function that checks if a givenmatching is a stable matching. The function should take as argumentthe matching, the 2D array Ranking, the array Current, and N, whereN = |M| = |W|, M is the set of men, and W is the set of women. Thefunction should return True if the given matching is a stablematching and False otherwise. Your algorithm must run in O(N^2)time in the worst-case; explain how your algorithm achieves this.To clarify the pseudocode, you may also have your function take thesets M and W as arguments and treat them as arrays, wheremi = M [i] and wi = W [i].

Context: We have been discussing the Gale-Shapely Algorithm inclass.

Expert Answer


Answer to Write the pseudocode for a function that checks if a given matching is a stable matching. The function should take as ar…

Write Python 3 Program Looking Figure Following Information 1 Miles Ran Converted Kilomete Q43906005

I have to write a Python 3 program that is looking to figure outthe following information :

(1) Miles ran, converted from kilometers

(2) Average pace per mile

(3) Average miles per hour.

In order to perform the conversions above, I need to obtain thefollowing user inputs:

(1) Number of kilometers ran, a floating-point number

(2) Number of hours, a whole number

(3) Number of minutes, a whole number

The test case I will use for this code will be for a runner whoran 10 kilometers in 1 hour and 1 minute. If done correctly, theoutput should result with 6.21 miles, 9:49 pace, and 6.11MPH.  

So far, I have the following code for the user input:

distance = float (input (“Enter distance ran “))hours = int (input (“Enter hours ran “))minutes = int (input (“Enter minutes ran “))print (distance + ” km, ” + hours + ” hours, ” + minutes + ” minutes”)

On the output screen, it reads the following:

Enter distance ran 10

Enter hours ran 1

Enter minutes ran 1

I need help writing the code that will have the followingoutput:

You ran 6.21 miles

Your pace: 9 min 49 sec per mile

Your MPH: 6.11

Some other things to note:

There are 1.61 kilometers in a mile.  

The number of miles and average miles per hour should be roundedoff to two decimal places

Python’s math library has a floor function if needed, and can beaccessed through writing import math at the top of the .pyfile.  

If a calculation is done that says 10.8 minutes, that does notmean 10 minutes and 80 seconds, but rather 8/10 minutes, so aconversion would need to be made to minutes andseconds.  

Use a constant variable to store the number of kilometers in amile

Use round or format functions only for printing out, and do notsave any values that have been rounded off, floored,etc.  

Expert Answer


Answer to I have to write a Python 3 program that is looking to figure out the following information : (1) Miles ran, converted fr…

Write Python Code Calculate Total Amount Paid Meal Amount Meal Purchased Tip Items Purchas Q43853704

  1. Write a Python code which will calculate the total amount to bepaid for a meal from

  1. The amount of meal purchased
  2. Tip on items purchased
  3. Sales tax on items purchased.

[Note: Let tip be 15% of the amount ofmeal purchased and let sales tax be 7% of the amount of mealpurchased]

[Note: Accept the amount of mealpurchased using the input() method and display the

  1. Amount of meal purchased
  2. Tip on items
  3. Sales tax on items purchased
  4. Total amount to be paid.

Expert Answer


Answer to Write a Python code which will calculate the total amount to be paid for a meal from The amount of meal purchased Tip o…