What is the length of egg that has diameter of 120mm in scientific notation?
There is no simple answer to this question because eggs are not spherical but ellipsoids (3 dimensional ellipses). There is, therefore, no direct link between the diameter and length.
If it were spherical, the length would have been 1.2*10^2 mm.
How does a biologist use scientific notation?
Biologists use scientific notation to compute very large or very small numbers.
What is the scientific notation of 8 trillion?
8 times 10^12
The reason is because, as you know, one trillion is merely a one followed by twelve zeroes. Based on this, you would know that one trillion is 10 to the power of twelve. Therefore, 8 trillion would simply be 8 multiplied by 10 to the power of twelve.
Hopefully this answered your question... and next time, you can solve it! =)
Convert 251 to scientific notation?
Note that 251 is the same as 251.0. Move 2 decimal places to the left to get:
2.51 x 102
Importance of scientific notation?
Scientific notation provides a compact and clear way to express very large and very small numbers.
What is the Scientific Definition of cupit?
The Urban Dictionary lists a game called cupit, but it's not very scientific. I'm guessing you meant "cubit" which is an ancient measure of length, approximately equal to the length of a forearm. It was typically about 18 inches or 44 cm, though there was a long cubit of about 21 inches or 52 cm.
How do you write a Java program that converts a time from a 24-hour notation to 12-hour notation?
I am having extreme problems(i think logic) trying to convert 24 hour time notation to 12 hour time notation with AM and PM. I really don't have an idea of what the problem is. The user inputs a string time in 24 hour notation, and then the program is supposed to convert it, not using any java tools.
01public class TimeConvert
02{
03
04//int value of hour
05private String hour;
06
07//int value of minuets
08private String minuets;
09
10public TimeConvert()
11{
12hour="00";
13minuets="00";
14}
15
16//static method to convert a 24 hour time to 12 hour time
17public String doConversion(String aTime) throws TimeFormatException
18{
19//formatted String
20String timeFormated = String.format("That is the same as %s:%s",hour,minuets);
21
22//find the position of the colon
23int colon=aTime.indexOf(':');
24
25//if there is no colon
26if(colon!=2)
27{
28TimeFormatException tfe= new TimeFormatException("You entered "+aTime+"\nFormat must be hh:mm\n");
29throw tfe;
30}
31
32else
33{
34//parse the numbers before the colon
35hour = aTime.substring(0,colon);
36int intHour=0;
37
38//parse the numbers after the colon
39minuets = aTime.substring(3);
40int intMinuets=0;
41
42try
43{
44intHour= Integer.parseInt(hour);
45intMinuets= Integer.parseInt(minutes);
46
47if(intHour <0 intHour>23)
48{
49throw new TimeFormatException("\nYou entered "+hour+"\nHour must be less than 23\n");
50}
51else if(intMinuets<0 intMinuets>59)
52{
53throw new TimeFormatException("\nYou entered "+minuets+"\nMinuets must be less than 59\n");
54}
55
56else
57{
58if(intHour==12)
59{
60minuets+="PM";
61}
62
63else if(intHour<12)
64{
65minuets+="AM";
66}
67
68else if(intHour>12)
69{
70intHour=intHour-12;
71hour=Integer.toString(intHour);
72minuets+="PM";
73}
74}
75}
76
77catch(NumberFormatException nfe)
78{
79TimeFormatException tfe = new TimeFormatException("\nYou entered "+aTime+"\nFormat to hh:mm\n");
80throw tfe;
81}
82
83}
84return timeFormated;
85}
86}
Here is the custom exception class
01class TimeFormatException extends Exception
02{
03//one String parameter constructor to pass to super class Exception
04TimeFormatException(String msg)
05{
06super(msg);
07}
08
09//concatenate 2 String messages and pass to super class Exception
10TimeFormatException(String msg,String msg1)
11{
12super(msg1+msg);
13}
14}
And here is the test class to run the program.
01import java.util.*;
02public class TimeConvertTest
03{
04public static void main(String args[])
05{
06//instantiate Scanner
07Scanner scan=new Scanner(System.in);
08
09//instantiate TimeConvert object
10TimeConvert convert = new TimeConvert();
11
12while(true)
13{
14System.out.print("\nEnter Time in 24-hour notation<hh:mm>: ");
15
16String converted="unknown";
17
18//try to convert the time
19try
20{
21//ask user for a time
22String aTime=scan.next();
23converted=convert.doConversion(aTime);
24}
25
26catch(TimeFormatException tfe)
27{
28System.out.println(tfe.getMessage());
29}
30
31System.out.printf("%s\nAgain(y/n)",converted);
32String desc = scan.next();
33char opt = desc.charAt(0);
34switch(opt)
35{
36case'n':
37System.exit(0);
38break;
39
40case'y':
41break;
42}
43}
44
45}46}
What are the parts of a scientific notation expression?
Scientific notation is a way of representing numbers, usually very large or very small, in the form a*10^b where 1 ≤ |a| < 10 is a decimal number and b is an integer (negative or positive). a is called the mantissa and b is called the exponent.