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

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 ...

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 ...

Opengl programming in python 35write a program to render an

OpenGL Programming in Python 3.5 Write a program to render an animated humanoid walking robot. Specifications: Robot's body is a parallelogram box. Robot's head is a sphere. Robot's height is 60. Your robot must have two ...

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 ...

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 ...

Programming problemwrite a python script called passmerger

Programming Problem Write a Python script called passmerger that will merge the contents of two simplified user account tables in a database as described below. The script uses one command line argument that represents t ...

Write a python script that will implement the following

Write a python script that will implement the following command: merge sourcedirectory1 sourcedirectory2 destinationdirectory The idea is that the contents of sourcedirectory1 and sourcedirectory2 are going to be copied ...

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 ...

Objectivesthe objectives of this assignment are- to gain

Objectives The objectives of this assignment are: - To gain experience in designing algorithms for a given problem description and implementing those algo- rithms in Python 3. - To demonstrate the ability to: - Implement ...

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 ...

  • 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

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

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen