Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An astronomy application displays information about the eight planets in our solar system. Write the logic for this application in pseudocode: a. Visit this web

An astronomy application displays information about the eight planets in our solar system. Write the logic for this application in pseudocode:

a. Visit this web page: https://sciencing.com/order-planets-distance-sun8371065.html

b. Note down each planets name, distance from the sun, and diameter

c. Write the program such that it:

i. Displays a numbered list of the planets that includes 1. Planet number (1 is the planet closest to the sun and 8 is the one farthest from it) 2. Planets name 3. Distance from the sun 4. Diameter Here is a sample of the required format of output: Planet #1: Mercury is 36 million miles from the sun and has a diameter of 3031 miles

ii. Allows the user to enter the number of any planet, and displays output similar to that shown above, for that planet, e.g., if the user entered 1, the output would be the sentence shown above. If the user enters an invalid planet number, such as zero or 9, the program must display an error message.

iii. Allows the user to enter the numbers of any two planets, and outputs both their names as well as their distance from each other. If the user enters an invalid planet number, such as zero or 9, the program must display an error message.

Note: (ii) and (iii) above must be accomplished without any search being performed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions