Questions
Implement a python program in file named tarvel.py. Create an empty dictionary named responses. Implement while...

Implement a python program in file named tarvel.py. Create an empty dictionary named responses. Implement while loop to take in user's name and desired destination for as long as there are user inputs. Prompt user to input yes to continue and no to quit. Prompt for user's name. Receive the name into the program and save it as the value of name variable. Prompt user for their desired vacation destination. Receive response and save it as the value of a response variable. Send the name and response to your response dictionary as key-value pair. Once all inputs are in the program, print each poll participant's name and desired vacation destination. Use for loop to run through all key-pairs in the dictionary. Pay attention to your output. Print the dictionary to show the key-value pairs. Test program with 3 - 5 key value pairs.

In: Computer Science

Create a java program for Student profile with the following requirements. Each Student has: two variables...

Create a java program for Student profile with the following requirements.

  1. Each Student has: two variables id, and name.
  2. A Student can be initialization with two constructers:
  • Constructer without parameters, that set the id to zero and the name to an empty string.
  • Constructer with tow parameters to initialize the variables id and name by a specific value.
  1. Add a set method for each variable that change them to a specific value.
  2. Add a get method for each variable which return its value.

To test the program, create a class StudentTest with the main method.

In the main method:

  1. Create two empty Student profiles S1and S2.
  2. Print the S1and S2 information.
  3. Create a new student profile S3, specify the student id and name.
  4. Change S3id and name.
  5. Print the id and name of S3.

Answer:

In: Computer Science

Lab 1-Refreshing Linux basics Objective: (Complete using Netlab) Please try each command in Linux system, and...

Lab 1-Refreshing Linux basics

Objective: (Complete using Netlab)

Please try each command in Linux system, and get screenshots (you may put multiple commands in one screenshot) which can show how actually each command runs. Also, give a brief description (one or two sentences) for each command. For the commands which have multiple switches/parameters, please try one popular switch/parameter.

If after the command, there is “date”, please run date to show the system date and time before you run the command; but if there is “name”, please type your first and last name, such as “Levis (First name)   Johnson (Last Name)” before you run this command. Your screenshot must include the above information.

Linux Commands

grep (date), find, man, ls , chmod, chown (name), passed, useradd and adduser, su, vi, rmdir (date), wherein, lsmod, insmod (name), make, | pipe, ln, rm, cp, mv, (name), ld, ftp, more, less, cat (date), tar, top , ps (name), kill, df, last, patch, mkdir (date)

In: Computer Science

This assignment involves the use of text files, lists, and exception handling and is a continuation...

This assignment involves the use of text files, lists, and exception handling and is a continuation of the baby file assignment. You should now have two files … one called boynames2014.txt and one called girlnames2014.txt - each containing the top 100 names for each gender from 2014. Write a program which allows the user to search your files for a boy or girl name and display where that name ranked in 2014. For example …

>>> Enter gender (boy/girl): boy

Enter the name to search for: Michael

Michael was ranked # 7 in 2014 for boy names.

>>> ================================ RESTART ================================

Enter gender (boy/girl): boy

Enter the name to search for: MIchAel

MIchAel was ranked # 7 in 2014 for boy names.

>>> ================================ RESTART ================================

Enter gender (boy/girl): boy

Enter the name to search for: Jeremiah

Jeremiah was ranked # 56 in 2014 for boy names.

>>> ================================ RESTART ================================

Enter gender (boy/girl): girl

Enter the name to search for: olivia

olivia was ranked # 2 in 2014 for girl names.

>>> ================================ RESTART ================================

Enter gender (boy/girl): girl

Enter the name to search for: billie jean

billie jean was not ranked in the top 100 girl names for 2014.

>>> ================================ RESTART ================================

Enter gender (boy/girl): gril

Enter the name to search for: sue

Invalid gender >>>

Make sure to use try/except blocks to handle the exception if the files are not found or unavailable. Use the index method on the list to find the baby name. Use a try/except block to handle the exception caused when the name is not found in the file. Also, check for an invalid gender entry.

In: Computer Science

Problem A stone is thrown from the top of a building with an initial velocity of...

Problem A stone is thrown from the top of a building with an initial velocity of 24.3 m/s straight upward, at an initial height of 53.1 m above the ground. The stone just misses the edge of the roof on its way down, as shown in Figure 2.20.

(a) Determine the time needed for the stone to reach its maximum height.
(b) Determine the maximum height.
(c) Determine the time needed for the stone to return to the height from which it was thrown, and the velocity of the stone at that instant.
(d) Determine the time needed for the stone to reach the ground.
(e) Determine the velocity and position of the stone at t = 5.68 s.

(a) Find the time when the stone reaches its maximum height.
Write the velocity and position kinematic equations. v = at + v0
Δy = y - y0 = v0t +  at2
Substitute a = -9.80 m/s2, v0 = 24.3 m/s, and y0 = 0 into the preceding two equations. v = (-9.80 m/s2)t + 24.3 m/s  (1)
y = (24.3 m/s)t - (4.90 m/s2)t2  (2)
Substitute v = 0, the velocity at maximum height, into Equation (1) and solve for time. 0 = (-9.80 m/s2)t + 20.0 m/s

s
(b) Determine the stone's maximum height.
Substitute the time found in part (a) into Equation (2). ymax = (24.3 m/s)(t s) - (4.90 m/s2)(t s)2 =  m
(c) Find the time the stone takes to return to its initial position, and find the velocity of the stone at that time.
Set y = 0 in Equation (2) and solve for t. 0 = (24.3 m/s)t - (4.90 m/s2)t2
= t(24.3 m/s - 4.90 m/s2t)
t =  s
Substitute the time into Equation (1) to get the velocity. v = 24.3 m/s + (-9.80 m/s2)(t)
v =  m/s
(d) Find the time required for the stone to reach the ground.
In Equation (2), set y = -53.1 m. -53.1 m = (-24.3 m/s)t - (4.90 m/s2)t2
Apply the quadratic formula and take the positive root. t =  s
(e) Find the velocity and position of the stone at t = 5.68 s. Substitute values into Equations (1) and (2). v = (-9.80 m/s2)(5.68 s) + 24.3 m/s
v =  m/s

y = (24.3 m/s)(5.68 s) - (4.90 m/s2)(5.68 s)2
y =  m

In: Physics

480 V, 200 kVA, 08 PF lagging, 60 Hz two pole Y connected synchronous generator has...

480 V, 200 kVA, 08 PF lagging, 60 Hz two pole Y connected synchronous generator has a synchronous reactance of 0.25 Ω and an armature resistance of 0.03 Ω. At 60 Hz, its friction and windage losses are 6 kW, and its core losses are 4 kW. The field circuit has a dc voltage of 200 V, and the maximum IF is 10 A. The resistance of the field circuit is adjustable over the range from 20 to 200 Ω. The OCC of the generator is shown in figure

a. How much the field current is required to make VT equal to 480 V when the generator is running at no load? [4.55 A]
b. What the internal generated voltage of this machine at rated conditions? [322 @ 7.8°]
c. How much the field current is required to make VT equal to 480 V when the generator is running at rated conditions? [558 V]
d. How much power and torque must the generator’s prime mover be capable of supplying? [175.2 kW, 465 Nm]
e. Assume that the field current of the generator is adjusted to achieve rated voltage (480 V) at full load conditions in each of the questions below.
1. What is the efficiency of the generator at rated load? [91.3%]
2. What is the voltage regulation of the generator if it is loaded to rated kilovoltamperes with 0.8-PF lagging loads? [16.2%]
3. What is the voltage regulation of the generator if it is loaded to rated kilovoltamperes with 0.8-PF leading loads? [-9.0%]
4. What is the voltage regulation of the generator if it is loaded to rated kilovoltamperes with unity power-factor loads? [5.1%]
f. Assume that the field current of the generator in Problem 5-2 has been adjusted so that it supplies rated voltage when loaded with rated current at unity power factor. (You may ignore the effects of RA when answering these questions.)
1. What is the torque angle δ of the generator when supplying rated current at unity power factor? [12°]
2. What is the maximum power that this generator can deliver to a unity power factor load when the field current is adjusted to the current value? [941 kW]
3. When this generator is running at full load with unity power factor, how close is it to the static stability limit of the machine? [196 kW]
4. Plot the torque angle δ as a function of the power supplied by the generator for these conditions.
3. A 3-phase 50-Hz star-connected 2000-kVA, 2300 V

In: Electrical Engineering

Carlsbad Corporation's sales are expected to increase from $5 million in 2016 to $6 million in...

Carlsbad Corporation's sales are expected to increase from $5 million in 2016 to $6 million in 2017, or by 20%. Its assets totaled $2 million at the end of 2016. Carlsbad is at full capacity, so its assets must grow in proportion to projected sales. At the end of 2016, current liabilities are $1 million, consisting of $250,000 of accounts payable, $500,000 of notes payable, and $250,000 of accrued liabilities. Its profit margin is forecasted to be 5%, and the forecasted retention ratio is 40%. Use the AFN equation to forecast the additional funds Carlsbad will need for the coming year. Write out your answer completely. For example, 5 million should be entered as 5,000,000. Round your answer to the nearest cent.

$

In: Finance

Right Now, Inc. purchases a large piece of equipment from ARCSOFT Corp. The terms of the...

Right Now, Inc. purchases a large piece of equipment from ARCSOFT Corp. The terms of the purchase call for Right Now to take delivery of the equipment on June 1 , 2016 upon transfer of $50,000 to ARCSOFT on that same day. Additional payments of $200,000 is to be paid by Right Now to ARCSOFT on June 1, 2017 and June 1, 2018. The equipment will be usable upon delivery with no further involvement by ARCSOFT. Both companies only make adjusting entries at the end of the year. The normal borrowing rate for Right Now is 8%.

What journal entries should Right Now and ARCSOFT make on:

June 1, 2016

Dec 31, 2016

Dec 31, 2017

June 1, 2018

In: Accounting

Carlsbad Corporation's sales are expected to increase from $5 million in 2016 to $6 million in...

Carlsbad Corporation's sales are expected to increase from $5 million in 2016 to $6 million in 2017, or by 20%. Its assets totaled $4 million at the end of 2016. Carlsbad is at full capacity, so its assets must grow in proportion to projected sales. At the end of 2016, current liabilities are $1 million, consisting of $250,000 of accounts payable, $500,000 of notes payable, and $250,000 of accrued liabilities. Its profit margin is forecasted to be 5%, and the forecasted retention ratio is 35%. Use the AFN equation to forecast the additional funds Carlsbad will need for the coming year. Write out your answer completely. For example, 5 million should be entered as 5,000,000. Round your answer to the nearest cent.

In: Finance

Lorelei files HOH and owns an inn called The Dragon Fly. Currently The Dragon Fly is...

Lorelei files HOH and owns an inn called The Dragon Fly. Currently The Dragon Fly is a single member LLC and all income is reported on her personal income tax return. During 2016, the net profit from The Dragon Fly was $175,500. Lorelei has additional taxable income of $115,000. She is considering incorporating The Dragon Fly. Please calculate the following:

What is Lorelei’s 2016 income tax liability if The Dragon Fly remains a Single Member LLC?

What is Lorelei’s minimum 2016 income tax liability (both individual & corporate) if she incorporates The Dragon Fly, assuming she is able to pay herself the desired salary?

What should she do? Explain.

In: Accounting