Your Perfect Essay is Just a Click Away

Starting at $8.00 per Page

100% Original, Plagiarism Free, Customized to Your instructions!

Order Now My Account

I would need answers to all of the questions bellow.
I have uploaded a zip file which contains a python file that includes the same questions.
“””
Question 1
Create a try block for when a user enters a number and prints try again
if it doesn’t pass
For example: float(num)
“””
“””
Question 2
Write a segment of code (not a function on a notebook) that dose the following:
(a) Reads in a single line from the user that is either empty (no characters).
Only whitespace characters, or constants a single word on it. Here, a word
is defined as a sequence of nonwhitespace characters.
(b) If there is no words on the line, your code should print the message “No word”.
(c) If there is a word on the line, your code should print the index of the first
character of the word, followed by the index of the last character of the word, in
the format shown in the example below.
Your code cannot use any methods or operators of the string class, except for
accessing a single character by index, and the isspace method of the string class,
which returns True if the calling character is a whitespace character, and False
if not. And your code cannot use any other functions or methods, except for
the built-in Python len function. So your code needs to iterate down the list,
character by character, gathering the required information.
A few examples:
– If the input is “”, your code should print “No word”
– If the input is ” “, your code should print “No word”.
– If the input is “abc”, your code should print “(0, 2)”
– If the input is ” abcd”, your code should print “(2, 5)”.
– If the input is “abcd “, your code should print “(0, 3)”.
– And if the input is ” abcde “, your code should print “(2, 6)”.
“””
“””
Question 3
Here is code that simply creates a GUI window, and puts in canvas in it.
import tkinter as tk
class Lines:
def __init__(self):

# Set up window
self.window = tk.Tk()
self.window.title(“Drawing Program”)

# Place canvas in window
self.canvas = tk.Canvas(self.window, width = 400,
height = 400, bg = “white”)
self.canvas.grid(row=1, column=1)

# Add constructor code (A)

# Start event loop
self.window.mainloop()

# Add method(s) (B)
if __name__ == “__main__”:
# Create GUI
Lines()
You will add code to this to do the following:
– Wait for the user to click on the mouse, and then wait for a second mouse
click.
– Then, draw a line that has the two mouse click locations as the ends of
the line.
– Then wait for two more mouse clicks, and draw another line with the next
two mouse click locations as the ends of the new line.
– Keep doing this indefinitely (until the program is terminates).
– Don’t erase any lines that are drawn.
“””
“””
Question 4
Express each of the following function using Big-O notation:
(a) t(n) = 5n**3 + 2n + 1000
(b) t(n) = 2logn + 15n
(c) t(n) = 1000n**2 + 2**n
“””
“””
Question 5
Consider the following function named intersection that has two parameters,
Ist_1 and 1st_2, that are both lists. Both lists have the same length, and
you can refer to that length as n. Also, the lists are not sorted. intersection
returns a list containing the elements of 1st_1 that also appear in Ist_2.
def intersection(1st_1, 1st_2):
# returns a list containing the elements of
# list 1st_1 that are also in list lst_2
# both lst_1 and lst_2 have n items in them.
intersection = []
for item in 1st_1:
if item in 1st 2:
intersection.append(item)
return intersection
Express the worst case running time of intersection as a function of n (the
size of 1st_1 and 1st_2), using Big-O notation.
“””

Do you need any assistance with this question?
Send us your paper details now
We’ll find the best professional writer for you!

"We offer the best custom paper writing services. We have done this question before we can also do it for you."

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

Our Service Charter


1. Professional & Expert Writers: Experts Essays only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Experts Essays are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Experts Essays are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Experts Essays, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

Open chat
Scan the code
We guarantee high quality work that's 100% original on time. GET STARTED