Answer:
double x = 2.5;
double y = -1.5;
int m = 18;
int n = 4;
string s = "Storm";
string t = "Watch";
The output of the expression "x + n*y - (x+n)*y" is "6.25".
and the output of expression "m/n + m%n" is "6".
Explanation:
for the first expression,
x + n*y - (x+n)*y ,put value of every variables in it.
=2.5+4*(-1.5)-(2.5+4)*(-1.5)
=2.5-6.0-(6.5*(-1.5)
=-3.5+9.75
=6.25
for the second expression,
m/n + m%n, put value of every variables in it.
=18/4 +18%4
=4+2 ("/ will give quotient and % will give remainder")
=6
Two types of physical connection are:
A wired connection using a cable
A wireless connection using radio waves
Answer:
miles_gallon = float(input("Enter car's miles/gallon: "))
dollars_gallon = float(input("Enter gas dollars/gallon: "))
print("Gas cost for 20 miles is $", (20 / miles_gallon) * dollars_gallon)
print("Gas cost for 75 miles is $", (75 / miles_gallon) * dollars_gallon)
print("Gas cost for 500 miles is $", (500 / miles_gallon) * dollars_gallon)
Explanation:
*The code is in Python.
Ask the user to enter the car's miles/gallon and gas dollars/gallon
Calculate the gas cost for 20 miles, divide 20 by miles_gallon and multiply the result by dollars_gallon, then print it
Calculate the gas cost for 75 miles, divide 75 by miles_gallon and multiply the result by dollars_gallon, then print it
Calculate the gas cost for 500 miles, divide 500 by miles_gallon and multiply the result by dollars_gallon, then print it
Answer:
<h2> RAM</h2>
- <em>It</em><em> </em><em> </em><em>stands</em><em> </em><em>for</em><em> </em><em>Random</em><em> </em><em>Access</em><em> </em><em>memory</em><em>.</em>
- <em>It</em><em> </em><em>is</em><em> </em><em>used</em><em> </em><em>for</em><em> </em><em>both</em><em> </em><em>purpose</em><em>(</em><em> </em><em>read</em><em> </em><em>and</em><em> </em><em>write</em><em>)</em><em>.</em>
- <em>It</em><em> </em><em>is</em><em> </em><em>volati</em><em>le</em><em> </em><em>memory</em><em>.</em>
<h2>
<em>R</em><em>O</em><em>M</em></h2>
- <em>It</em><em> </em><em>stands</em><em> </em><em>for</em><em> </em><em>Read</em><em> </em><em>only</em><em> </em><em>memory</em><em>.</em>
- <em>It</em><em> </em><em>can</em><em> </em><em>be</em><em> </em><em>used</em><em> </em><em>only</em><em> </em><em>to</em><em> </em><em>perform </em><em>the</em><em> </em><em>read</em><em> </em><em>oper</em><em>ation</em><em>.</em>
- <em>It</em><em> </em><em>is</em><em> </em><em>non-volatile</em><em>.</em>
<em>Hope</em><em> </em><em>this</em><em> </em><em>helps</em><em>.</em><em>.</em><em>.</em>
<em>Good</em><em> </em><em>luck</em><em> on</em><em> your</em><em> assignment</em><em>.</em><em>.</em><em>.</em>