I need this Java code transform to Python Code
PROGRAM:
import java.util.Scanner;
public class Main
{
static int count=0;
int calculate(int row, int column)
{
count++;
if(row==1&&column==1)
{
return 0;
}
else if(column==1)
{
return ((200+calculate(row-1,column))/2);
}
else if(column==row)
{
return (200+calculate(row-1,column-1))/2;
}
else
{
return
((200+calculate(row-1,column-1))/2)+((200+calculate(row-1,column))/2);
}
}
public static void main(String[] args)
{
int row,column,weight;
Main m=new Main();
System.out.println("Welcome to the Human pyramid. Select a row
column combination and i will tell you how much weight the person
is supporting");
System.out.println("Please type your selection for Row and
Column");
Scanner scan=new Scanner(System.in);
row=scan.nextInt();
column=scan.nextInt();
if(row==0 && column==0)
{
System.out.println("Thanks for playing Human Pyramid. Don't let me
down.");
System.exit(0);
}
if(row==0 || column==0)
{
System.out.println("Wrong option");
System.exit(0);
}
weight=m.calculate(row,column);
System.out.println("Person at ("+row+","+column+") is supporting
"+weight+" pounds");
System.out.println("Recursive function is called "+count+"
times");
}
}
In: Computer Science
Jeff, the Director of Business Development, promised a promotion to Anne, his Assistant Regional Director, to become Regional Director when the old Regional Director was to leave her post in two weeks for another position outside the company. Jeff did not clear this decision with his boss Fred, the Vice President of Marketing before he made the promise to Anne. Jeff thought that it was within his authority to offer the position to Anne without first clearing it with Fred, or consulting human resources. The company was a fairly large developer of residential properties operating in 12 states in the southern United States. Thus, its human resources department was professionalized and balked at the arbitrariness of Jeff’s promise to appoint a person in a job without a fair and open hiring process, citing EEOC laws, and the backlash of regulatory consequences of such behavior. The brakes were put on the entire hiring process, and Anne did not get the job. An outside hire (Mary) eventually received the position. Anne quit immediately! Several projects had to be put on hold for several months until Mary could be brought up to speed, costing thousands of dollars. NO PARTICULAR BEHAVIORAL PATTERN
In: Operations Management
Complete the data table below with the values you measured in the experiment. Remember to include units and use proper sig figs.
| Amount measured | |
| Methanol | 8.01 mL |
| Vegetable oil | 1.02 mL |
2. How many moles of biodiesel (methyl ester) is produced per mole of triglyceride?
3. What important step does calcium methoxide facilitate? Is the calcium methoxide used up in the synthesis?
4. Complete the data table below with the values you measured in the experiment. Remember to include units and use proper sig figs. Show work for all calculations below the table.
| Mass of Graduated cylinder | volume of biodiesel | Mass of GC + Biodiesel | Mass of Biodiesel | Density of biodiesel | pH of Biodiesel | Presence of Intermediates? (y/n) |
| 50.30 g | 1.2 mL | 51.41 g |
5. Discuss the results of the pH and test for intermediates measurement. Was there a complete synthesis of biodiesel in your reaction? Support your conclusion with evidence from your experiment.
6. Compare and contrast the synthesis of biodiesel with the saponification of fatty acids performed last week. What similarities are there between the reactants? What type of reaction is each? What is the difference between the products?
In: Chemistry
Part III: On Acid Sokka and Momo drank some yummy cactus juice but it upset their body a bit due to the acidity. Katara asked Aang to help her but when she needed him most he vanished. She has to settle for your help making a remedy for Sokka and Momo. 1) You take out your lab equipment and you have a series of solutions of acids and bases that can be used to offset the acid. They are labeled with their pH value. Katara needs you to explain to her what a pH value is and why you use pH instead of just hydrogen concentrations. (10 pts) 2) What equation does Katara need to use to determine Hydrogen concentration from pH? (5 pts) 3) If the concentration of protons in the cactus juice is equal to 10-4 M , what is the pH? (5 pts) 4) To cure Sokka and Momo you need to use a solution with a pH of 10. What is the concentration of protons in the remedy? (5pts) Part IV: The Big Four ¥ For each of the four images below identify: which type of macromolecule they represent, their subunits, the bonds that hold each subunit together, and their overall function. (5 pts/image)
In: Biology
2. The weak base, hydroxylamine (HONH2) is generally stable in solution but can easily explode if dried into its solid state. The pKa of its conjugate acid is 5.96 (Harris, Appendix G). A 50.0 mL solution containing hydroxylamine is titrated to the endpoint with 32.84 mL of 0.0568 M HCl.
a) Write out the chemical equation for the aqueous equilibrium of this aqueous monoprotic base before the addition of any acid. Also write out the also the mathematical equilibrium expression. What fraction of hydroylamine is dissociated into ions, initially?
b) Write the expression for the relevant equilibrium process occurring following complete neutralization (to the equivalence point) described above. What fraction of the conjugate acid is dissociated into ions at this point?
c) What acid/base indicator is best suited to the pH of this titration endpoint? Support your choice quantitatively, and use the textbook table of indicators in Chapter 10 of Harris 8th Edition of Quantitative Chemical Analysis.
d) Since this is the titration of a very weak base, identify a possible analytical approach you could use to improve the quantification of hydroxylamine; in other words, when the endpoint isn’t very clear, what is an example of a technique used to titrate very weak acids or bases?
In: Chemistry
1. write the balance chemical equation for the
reaction of KHP with NaOH
2. Suppose your laboratory instructor inadvertently gave you a
sample of KHP contaminated with NaCL to use in standardizing your
NaOH. How would this affect the molarity you calculated for your
NaOH solution? Justify your answer.
3.How many grams of NaOH are needed to prepare 500ml of 0.125 M
NaOH?
4 A solution of malonic acid H2C3H2O4, was standardized by
titration with 0.1000 M NaoH solution. If 20.76ml of the NaOH
solution is required to neutralize completely 12.95ml of the
malonic acid solution, what is the molarity of the malonic acid
solution.
H2C3H2O4 +2NaOH > Na2 C3H2O4 + 2H2O
5. Sodium Carbonate is a reagent that may used to standardize acids
in the same way you used KHP in this experiment. In such a
standardization, it was found that a 0.512g sample of sodium
carbonate requried 26.30ml of sulfuric acid solution to reach the
end point for the reaction.
Na2CO3(aq) + H2SO4(aq)> H2O(l) + CO2 (g) + Na2SO4(aq)
What is the molarity of the H2SO4.
6. A solution contains 6.30 ×10-2g of oxalic acid H2 C2 O4. 2H2O,
in 250ml. What is the molarity of this solution.
In: Chemistry
|
Cellular Structure |
Proteins |
Lipids |
Nucleic Acids |
Carbohydrates |
|
Nucleus |
||||
|
mitochondrion |
||||
|
Chloroplast |
||||
|
Cell membrane |
||||
|
Smooth endoplasmic reticulum |
||||
|
Rough endoplasmic reticulum |
||||
|
Golgi apparatus |
||||
|
Cell wall |
||||
|
amyloplast |
||||
|
cytoskeleton |
||||
|
ribosome |
In: Biology
Which one of these is not like the others? (2 pts each) In each set of 3 molecules CROSS OUT one option that does not fit and indicate the correct explanation for why it does not fit the set in the blank. For each set cross out only ONE molecule, and if the same set occurs twice choose a different molecule each time, using a different answer for each blank.
a) Glycogen Amylose
Amylopectin
b) Chitin
Cellulose
Amylopectin
c) Chitin
Cellulose
Amylopectin
d) Triacylglycerol
Sphingolipid
Glycerophospholipid
e) Triacylglycerol
Sphingolipid
Glycerophospholipid
f) Proteoglycan
Glycoprotein Lectin
_______ _______ _______ _______ _______ _______
Explanations: (not all will be used)
Twohaveα1→4linkages;onehasβ1→4linkages
Twohaveβ1→4linkages;onehasα1→4linkages
Two have α1→6 linkages; one has β1→6 linkages
Twohaveα1→6branches,onedoesnot
TwodoNOThaveα1→6branches,onedoes
Two are made from D-glucose, one is not
Two are easily digestible by most animals, one is not
Two are used for energy storage, one is not
Two are made from glycerol, one is not
Two are made from fatty acids, one is not
Twoaremembranelipids,oneisnot
Two contain protein components, one does not
Two have covalently attached carbohydrates, one does not
In: Biology
Data Table 2. Reviewing Compounds.
|
#1 |
|
|
Compound Name |
Compound Name |
|
Are #1 geometric isomers, structural isomers, or not isomers? |
|
|
#2 |
|
|
Compound Name |
Compound Name |
|
Are #2 geometric isomers, structural isomers, or not isomers? |
|
|
#3 |
|
|
Compound Name |
Compound Name |
|
Are #3 geometric isomers, structural isomers, or not isomers? |
|
Data Table 3. Benzene.
|
Question |
Answer |
|
What is the molecular geometry of the carbons in benzene? |
|
|
Structural formula of methylbenzene |
|
|
Structural formula of 1-propyne |
Data Table 4. Alcohols.
|
Question |
Answer |
|
Structural formula of 1-propanol |
|
|
Why is oxygen represented with a “bent” structure? |
|
|
Structural formula of 2-propanol |
Data Table 5. Ethers, Aldehydes, and Ketones.
|
Question |
Answer |
|
Structural formula of dimethyl ether |
|
|
What is the relationship that exists between ethanol (C2H6O) and dimethyl ether (C2H6O)? |
|
|
Structural formula of methanal |
|
|
Molecular geometry of the aldehyde |
|
|
Structural formula of 2-propanone |
|
|
What is the relationship between propanal and propanone? |
Data Table 6. Carboxylic Acids and Amines.
|
Question |
Answer |
|
Structural formula of ethanoic acid |
|
|
Structural formula of benzoic acid |
|
|
Structural formula of methylamine |
Questions
Describe the difference between an aldehyde and a ketone.
In: Chemistry
The experiment is Determination of Acetic Acid in Vinegar. Please answer as many questions as you can.
What are primary and secondary standards? Give examples.
What is KHP and why was it used in this lab?
How is acetic acid formed in vinegar solution?
Why are pH indicators strongly colored even in solid state?
Why/how do pH indicators change colors in acid-base solutions?
Molar mass of acetic acid is often calculated or experimentally measured as 120 g/mol. Why?
Suggest another analytical method to determine the end point of an acid-base titration.
pH indicators are often weak acids or bases. Would adding indicators interfere with the determination of the endpoint for desired acid-base titration?
If a solution of NaOH is prepared and standardized today and left on the bench for a week, would you expect the pH of the solution change? Why? Ignore solvent (water) evaporation.
You had titrated unknown vinegar solution in flask against standard NaOH from burette using phenolphthalein indicator. If you had titrated standard NaOH solution in flask against unknown vinegar solution in burette using the same indicator, would it be easier or more difficult? Why?
In: Chemistry