Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Python Expert

Background:

Selection statements (if/else if/else combinations) allow us to prepare code that can execute different statements based on the current values seen in a particular run of the program. We will use this to prepare a program that performs calculations and selectively reports on different properties of the find outd values. We will be asking the user for details describing an ellipse, and then reporting back several properties of the ellipse to the user.

First, ask the user for the vertical axis radius. They will enter a floating point number.  Second, ask the user for the horizontal axis radius. They again will enter a floating point number. Afterwards, you will report whether or not it is a circle, if it is tall, long, or neither, the ellipse's focal distance f, and the eccentricity e of the ellipse.

Descriptions:

1) Checking for a circle. On a line by itself, your program must either print" is a circle: YES "or" is a circle: NO", appropriately.

2) Tallness or longness. If the ellipse is taller than it is long, your program must print "this is a tall ellipse "on its own line. If it is longer than it is tall, your program must instead print "this is along ellipse "on its own line. If it is exactly as tall as it is long, don't print anything.

3) Focal distance.  Your program must print "focal distance, f: "followed by the actual value of the focal distance. f= √(a2-b2 ), where a is the major radius and b is the minor radius.

4) Eccentricity. Your program will find out it, and print "eccentricity: "followed by the correct value.

Python, Programming

  • Category:- Python
  • Reference No.:- M9161

Have any Question? 


Related Questions in Python

P Programming in Python CS21A Lab I: Lists and Tuples - Files

Programming in Python CS21A Lab I: Lists and Tuples - Files Learning Objectives for this lab include: - Understand list basics including elements and subscripts. - Learn how to find high and low values of a list. - Learn ...

Questions for python programing answer each question with

QUESTIONS FOR PYTHON PROGRAMING (answer each question with at least 5 sentences) 1. Discuss the basic elements of a computer program and how they are put together. (Hint: If you write a paper for class, the elements are ...

Pythonprofessor merlin has asked you to help him he has 30

Python Professor Merlin has asked you to help him. He has 30 total students in his class, but he is not sure that all of them took his last exam. He wants to average the grades for his last exam in his medieval literatur ...

This assignment will allow you to do a more open-ended

This assignment will allow you to do a more open-ended exploration of online social networking. The goal is to let you use some of the tools we've learned in class on your own. There are some requirements to constrain yo ...

Python program super pongyour version of pong will be more

Python Program: super pong Your version of pong will be more complete and have the following features at a minimum: 1) The scores for each player should be displayed 2) Option for ball speed - Choose between three differ ...

Lab 1 functionslearning objectives for this lab include1

Lab 1: Functions Learning Objectives for this lab include: 1. Understand how functions work. 2. Know how to define and call a function. 3. Learn how to declare local variables. 4. Learn how to pass arguments to functions ...

Write a python program to encode the plain text message and

Write a Python program to encode the plain text message and another Python program to decode the encoded message. Use the following as starter code: # # HW 5 Caesar Cipher: Encoder # Do not modify next 8 lines def encode ...

Pythondirectory mergerwrite a python script that will

PYTHON Directory Merger Write a python script that will implement the following command: merge sourcedirectory1 sourcedirectory2 destinationdirectory The idea is that the contents of sourcedirectory1 and sourcedirectory2 ...

Python codeyour version of pong will be more complete and

Python Code Your version of pong will be more complete and have the following features at a minimum: 1) The scores for each player should be displayed 2) Option for ball speed - Choose between three different speed level ...

Python programming assignmentin this assignment you will

Python Programming Assignment In this assignment you will write a program which reads a data file containing information in different formats, validates this data, and prints out a report incorporating this data. The dat ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro