## Write a program that takes two int values a and b from the command line and prints a random integer between a and b.

import java.lang.Math;

import java.util.Scanner;

public class RandomNumbers{

public static void main(String args[])

{

System.out.println(“Enter a number “); //This prompts the user to enter a number

Scanner scan = new Scanner(System.in);

double t = scan.nextDouble(); //Stores the valuse as a double

System.out.println(“Enter a second number “); //This prompts the user to enter a 2nd number

double v = scan.nextDouble(); //Stores the valuse as a double

double w = Math.floor(Math.random()*(t-v+1)+v); //assigns w to a random number in between t & v

System.out.println(w); //prints w

}

}

## Wind chill

Given the temperature `t` (in Fahrenheit) and the wind speed `v` (in miles per hour), the National Weather Service defines the effective temperature (the wind chill) to be:

w = 35.74 + 0.6215 t + (0.4275 t – 35.75) v

^{0.16}

Write a program WindChill.java that takes two `double` command-line arguments `t` and `v` and prints out the wind chill. Use `Math.pow(a, b)` to compute a^{b}. Note: the formula is not valid if t is larger than 50 in absolute value or if v is larger than 120 or less than 3 (you may assume that the values you get are in that range).

## How Much Energy is Released?

How much energy (in kilojoules) is released when 7.40g of water at 39.0∘C is cooled to -18.0∘C? The heat of fusion of water is 6.01 kJ/mol, and the molar heat capacity is 36.6 J/(K⋅mol) for ice and 75.3 J/(K⋅mol) for liquid water.

## What is the Radius of a Tungsten atom?

The length of a unit-cell diagonal that passes through the center atom in tungsten is equal to 549 pm.

What is the radius (in picometers) of a tungsten atom?

## What is the entropy of vaporization?

Naphthalene, better known as “mothballs,” has bp= 218∘C and ΔHvap = 43.3kJ/mol.

What is the entropy of vaporization, ΔSvap [in J/(K⋅mol)] for naphthalene?

## Dalton’s Law of Partial Pressure

A 1-L flask is filled with 1.10g of argon at 25 ∘C. A sample of ethane vapor is added to the same flask until the total pressure is 1.40atm .

What is the partial pressure of argon, P(Ar), in the flask?

What is the partial pressure of ethane, P(ethane), in the flask?