Question

Modify your project1.py Python program so that it displays the low, mid and high point values for periodic function and a douI am using python and I want to know how I can get the spacing between the low mid and high to be dependent on the range and how I can get that boarder to be dependent on the range as well. Im not sure what you mean, I just want to know about the spacing.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Spacing

From my observation of above screenshot ,spacing needs to done with reference to the difference between between mid , low and high.

For example if low=5 and high =10 then you have to maintain 5 spaces between them, which is there in the above screenshot

In the last screenshot the low=-5 and mid =10 and there are 15 spaces between them(mid -low) ,(10-(-5))=15 and high=25 and the space between them is also 15 spaces.

So to determine the spacing the value of difference between mid and low, and high and mid is used.

To print spaces you can use below code

x=' ';

midLowDifference=mid-low;

print(midLowDifference*x) ; so if midLowDifference is 15 then it will print 15 spaces.

similarly

highMidDifference=high-mid;

print(highMidDifference*x);

or you can also use

print("Low"+midLowDiference*x+"Mid"+highMidDifference+"High"); 
Add a comment
Know the answer?
Add Answer to:
I am using python and I want to know how I can get the spacing between...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PYTHON:please display code in python Part 1: Determining the Values for a Sine Function Write a...

    PYTHON:please display code in python Part 1: Determining the Values for a Sine Function Write a Python program that displays and describes the equation for plotting the sine function, then prompts the user for the values A, B, C and D to be used in the calculation. Your program should then compute and display the values for Amplitude, Range, Frequency, Phase and Offset. Example input/output for part 1: Part 2: Displaying a Vertical Plot Header A vertical plot of the...

  • using python in eclipses Question I am attempting to solve My attempt... 1. Add a new...

    using python in eclipses Question I am attempting to solve My attempt... 1. Add a new module named twenty_questions_class to the package library. 2. Define a class named TwentyQuestions in the module with an instance constructor and a method. a. The instance constructor _init is used to create an instance of the TwentyQuestions class with a value for the RANGE. b. The method named play lets the user play the game. For example, I am thinking of a secret number...

  • Python HELP How can a get the diagonals of an n x n list without using...

    Python HELP How can a get the diagonals of an n x n list without using numpy. For example if have a list: L = [[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Then I can get the diagonals: 1, 6, 11, 16 2, 7 , 12 3, 8 5 , 10 ,15 9, 14 2, 5 3, 6, 9 4, 7, 10, 13 8, 11, 14 12,...

  • Python HELP How can a get the diagonals of an n x n list without using...

    Python HELP How can a get the diagonals of an n x n list without using numpy. For example if have a list: L = [[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Then I can get the diagonals: 1, 6, 11, 16 2, 7 , 12 3, 8 5 , 10 ,15 9, 14 2, 5 3, 6, 9 4, 7, 10, 13 8, 11, 14 12,...

  • How to determine the value of Horizontal visibility using only PM10 Values? I want to know...

    How to determine the value of Horizontal visibility using only PM10 Values? I want to know if there is any specific formula for it. Please provide it with the source. Thank you in Advance.

  • In python, PART A: I am trying to get a dictionary with size(4, 5, 6) as...

    In python, PART A: I am trying to get a dictionary with size(4, 5, 6) as keys and an array for key containing a list of values (words from file of respective size) associated with those keys I am reading from a file of strings, where I am only interested with words of length 4, 5, and 6 to compute my program reading the text file line by line: At first, I have an empty dictionary then to that I...

  • Ive done this part but i want to know how i can change the file so...

    Ive done this part but i want to know how i can change the file so it accepts inputs and a file input PLEASE HELP PYTHON Write a program that computes the fuel efficiency of a multi-leg journey. The program will first prompt for the starting odometer reading and then get information about a series of legs. For each leg, the user enters the current odometer reading and the amount of gas used (separated by a space). The user signals...

  • I just want to know how do you get the 10%, im using the formula (1...

    I just want to know how do you get the 10%, im using the formula (1 + i/n)^n - 1 but I'm not gettting this number. I used 5 years for n and 8% for i. Bonita Company sells 8% bonds having a maturity value of $2,290,000 for $2,116,380. The bonds are dated January 1, 2020, and mature January 1 2025. Interest is payable annually on January 1. Your Answer Correct Answer ✓ Your answer is correct. Determine the effective-interest...

  • How would I type this up in python to get spiral circles in turtle 1 #...

    How would I type this up in python to get spiral circles in turtle 1 # This program draws a design using repeated circles. 2 import turtle 3 4 # Named constants 5 NUM_CIRCLES = 36    # Number of circles to draw 6 RADIUS = 100        # Radius of each circle 7 ANGLE = 10          # Angle to turn 8 ANIMATION_SPEED = 0 # Animation speed 9 10 # Set the animation speed. 11 turtle.speed(ANIMATION_SPEED) 12 13 # Draw 36...

  • Python debug. (Registration error) Hi, can you help me debug the error code, and how can I fix it...

    Python debug. (Registration error) Hi, can you help me debug the error code, and how can I fix it? Thank you very much! 4 import sqlite: 5 conn sqlite3.connect("OS_Employee.db") 7 withconn: 8 curconn.cursor() try: 10 # Take user input for Employee-ID. Error checks it. Makes sure it's not taken. EmployeeID = input ("Please enter a employee ID: ") First_Nameinput("Please enter the employee's first name: ") Last Nameinput("Please enter the employee's last name: ") Email-input ("Please enter the employee's email: ")...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT