Python Answers

Questions answered by Experts: 5 288

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Evaluate how the debugging process can be used to help develop more secure, robust applications.


  1. create an address class. Pass Country, City, Street Name, and House Number in Address class constructor and create a diagram

 This lab is a warm-up for the next assignment. We will learn to build a multi-threaded application. You will write a function that will simulate a long task. You will call the first method a number of times sequentially and record the time it takes to complete. They will call the first method again but in a threaded manner and time, the execution and then compare the two times. Description Create three functions:1.Create a function to the following:a.Take a string argument (name).b.Create a loop that will run 100 000 times. In this loop, the program will sleep 0.0001 seconds.c. After the completion of the loop, prints its name and a brief message.2.Create a second function to do the following:a. Takes a number argument (times to execute the loop).b.Store the current time. c.Call the function in step 1 the required number of times (sequentially).d.Check the elapsed time after the above calls are complete. e. Print the results as well as a brief message.

Design a 'book' class with title, author,publisher, price and author's royalty as instance variables. Provide getter and setter properties for all variables. Also define a method royalty() to calculate royalty amount author can expect to receive the following royalties :10% of the retail price on the first 500 copies ;12.5% for the next, 1000 copies sold, then 15% for all further other copies sold.


Then design a new 'ebook' class inherited from 'book'class.Add ebook format (EPUB, PDF, MOBI etc) and additional instance variable in inherited class.


override method to deduct GST @12% on ebooks

Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.

Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.

The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:

def new_line():

  print('.')

def three_lines():

  new_line()

  new_line()

  new_line()




Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.

Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.

The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:

def new_line():

  print('.')

def three_lines():

  new_line()

  new_line()

  new_line()




Write a python function Find_Status(A) (Refer RollNo_W8A_3.py ) which takes a list of person’s age as input return a list containing person life status whether they will remain alive or not based in above conditions.




You are given number stored in variable with the name number multiply the number stored in the variable by 50 and print the result obtained.

INPUT is the first and the only line of the input contains the number stored in the variable

Constraints 1<=N=> 20


list of lists that has the first number as the same number given in the input list and the second number be the square of the first number.

write a python function Square_List(A)  that takes a list as an input and returns another list of lists that has the first number as the same number given in the input list and the second number be the square of the first number.[[1, 1], [2, 4], [5, 25], [6, 36]]


LATEST TUTORIALS
APPROVED BY CLIENTS