Chat with us, powered by LiveChat write a python program | WriteDemy

Question Description

  1. Write a program that reads in two distinct positive integers. The program prints the difference between the larger number and the smaller one. Be sure that the program will print 6 both when 9 and 15 are read and when 15 and 9 are read. In other words, the program displays the difference between these two positive numbers, regardless of which one is larger.
  2. Write a program that reads in a character and a positive integer. If the character is a digit character, (i.e. '0', '1', …, '9'), the program prints the square root of the integer; otherwise, it prints the square of the integer. For example, if the character entered is 5 (which should be read in as char type, but the users enter 5 instead of ‘5’) and the integer value entered is 25, then the program displays the value 5, which is the square root of 25. On the other hand, if the character entered is c and the integer value is 8, then the program displays the value of 64, which is the square of 8.
  3. The fans of Tuskegee University Golden Tiger basketball team want to know whether or not the team had a winning season for the 2016-2017 season. Write a program to read the number of wins and the number losses that the Golden Tigers had in the season. The program then prints a message “What a season!!!” if Golden Tigers had a winning season; otherwise, it prints “More practice needed.” For example, if the number of wins is 18 and the number of losses is 12, the program displays the message What a season!!!. On the other hand, if the number of wins is 12 and the number of losses is 18, then the message More practice needed is displayed by the program.
  4. Write a program that reads a temperature reading and a character code. If the character code is 'C', the temperature reading is in Celsius; otherwise, the temperature reading is in Fahrenheit. If the character code is 'C', the program converts the temperature reading from Celsius to Fahrenheit; otherwise, it converts the temperature reading from Fahrenheit to Celsius. The output of the conversion should look like:

xxx.xx degrees Fahrenheit = yyy.yy degrees Celsius

or

xxx.xx degrees Celsius = yyy.yy degrees Fahrenheit

where xxx.xx is the temperature reading entered by the user and yyy.yy is converted temperature. Both degrees are displayed in 2 decimal places.

5. Write a program that reads two points representing a line segment. Each point is represented by x and y coordinates – (x, y). If the slope of the line passing through those two points exists, the program calculates and prints the slope of the line; otherwise, it prints a message indicating the slope does not exist. Hint: The slope of a line segment may be positive, zero, negative, or does not exist. Refer to the MATH 107 textbook or the Internet to find how to calculate the slope of a line segment passing through two points.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order