Write a program that reads a floating-point number

Assignment Help Python Programming
Reference no: EM132355343

Question

Write a program that reads a floating-point number and prints "zero" if the number is zero. Otherwise, print "positive" or "negative". Add "small" if the absolute value of the number is less than 1, or "large" if it exceeds 1,000,000.

a) Your code with comments

b) A screenshot of the execution

Test Cases:

0.5 (should print "positive" and "small")

-2000000 (should print "negative" and "large")

Reference no: EM132355343

Questions Cloud

Elderly individuals feel the social stigma of ageism : Do you believe that elderly individuals feel the social stigma of ageism? Is there any way to avoid social stigmas?
What are the must-haves for a company blog : Your company has decided to start a blog for their customers. What are three (3) must-haves for a company blog? Why have you decided upon these must-haves?
How do those components impact student learning : What components should be included in a school district strategic facilities plan? How do those components impact student learning?
Evaluate the communication within company : Does your manager communicate ideas, performance, expectations? What could be improved?
Write a program that reads a floating-point number : Write a program that reads a floating-point number and prints "zero" if the number is zero. Otherwise, print "positive" or "negative".
What is the probability that an 18-to 24 year old : A Nielsen study indicates that 18 to 24 year olds spend a mean of 135 minutes watching video on their smartphones per month. Assume that the amount of time
Identify and discuss the type of power-legitmate : Identify and discuss the type of power - legitmate, referent, reward - that Willie is exhibiting.
Add an option for the computer to guess as well as the user : You will add quite a bit of code to your project. You will add an option for the computer to guess as well as the user to guess a number.
Write an analysis of strategy implementation at pepsico : This final case involves an analysis of strategy implementation at Pepsico. You will use the resources you identified in the SLP to gather information.

Reviews

Write a Review

Python Programming Questions & Answers

  Write program that will extract the web addresses

write a program that will take this database file and extract the Web addresses that the user visited, the number of times the page was visited and the last

  A python program that takes a value from a user and store

You need help writing a Python program that takes a value from a user and stores it in the registry.

  Write the code using python to create a NAT engine

By using python write the following code to create NAT engine. Create an application that runs a listener or sorts. It will listen for incoming network packets

  Create a given artisan 3D pancake

How many cubic units of batter (to some given degree of accuracy) is required to create a given artisan 3D pancake defined by a given blueprint

  How many of each package should be made to minimize cost

Each Bronze package has 1 pen, each Silver package has 5 pens, and each Gold package has 2 pens. How many of each package should be made to minimize their cost? What is the minimum cost?

  Define a function findword that takes a line as input

Define a function "findWord" that takes a line as input and return the words & their counts (if stopwords, don't count the word)

  Programming exercise - routing of telephone

programming exercise - routing of telephone callsdescriptionsome telephone operators have submitted their price lists

  Creates and returns a tuple containing details of employee

CE151 - creates and returns a tuple containing details of the employee specified by the string. The string should be assumed to have the format

  What is the difference between cause and correlation

What is the difference between cause and correlation? What is the difference between mean and median? When would you present either the mean or median value?

  List similar names of the files in the directory

provide a written discussion of your code, what are its strengths and weaknesses, what are the boundary conditions where it will fail and where could it

  Print out the values of that loop using the print function

In Python, create a program that meets the following requirements: Print out the values of that loop using the Print function in Python.

  Convert a fahrenheit temperature to celsius

Convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd