Questions: 5 831

Answers by our Experts: 5 728

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 & Filtering

Print the following pattern using loops. Create your own logic, do not try to print pattern using print() statements.
3 3 3 3 3
3 2 2 2 3
3 2 1 2 3
3 2 2 2 3
3 3 3 3 3
Write a program to calculate an Internet browsing bill. Use the conditions specified as follows:
1 hour-Rs 40
½ hour- Rs 20
For unlimited hours in a day- Rs 200
The owner should enter the number of hours spent on browsing.

The following code should take a number as input, multiply it by 8, and print the result. In line 2 of the code below, the * symbol represents multiplication.


Fix the errors so that the code works correctly:


input ("Enter a number: ")

print (num * 8)

The code above is pre-populated in your code editor.


I don't know how to write the code for Assignment 4: Student Schedule edhesive


In this assignment, you will draw a student schedule by using a while loop.

You will ask the user for their first and last names, and then a list of their classes and room numbers. The loop should stop when the user enters STOP for their next class.

The schedule should print in the same format as the sample below. Some tips for formatting are:

  • Use spaces, not tabs, when printing the lines that contain only two asterisks to ensure that it is aligned with the lines containing nothing but asterisks.
  • Use tabs, not spaces, between certain items to help align the strings and variables as shown in the sample. You should end up with 3 tabs on each of these lines.
Create a program that takes the speed limit and speed of the car an issues a warning or a fine:
A warning if the speed is 5% above the speed limit.
A fine of £500 if the speed is 10% above the limit.
rt 1

Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters. Otherwise, it should return False.

Implement has_duplicates by creating a histogram using the histogram function above. Do not use any of the implementations of has_duplicates that are given in your textbook. Instead, your implementation should use the counts in the histogram to decide if there are any duplicates.

Write a loop over the strings in the provided test_dups list. Print each string in the list and whether or not it has any duplicates based on the return value of has_duplicates for that string. For example, the output for "aaa" and "abc" would be the following.

aaa has duplicates
abc has no duplicates

Print a line like one of the above for each of the strings in test_dups

Write a program in python that displays your name inside a box on the screen. Do your best to approximate lines with characters such as | - +.


Write a function named test_sqrt that prints a table like the following using a while loop, where "diff" is the absolute value of the difference between my_sqrt(a) and math.sqrt(a).

a = 1 | my_sqrt(a) = 1 | math.sqrt(a) = 1.0 | diff = 0.0
a = 2 | my_sqrt(a) = 1.41421356237 | math.sqrt(a) = 1.41421356237 | diff = 2.22044604925e-16
a = 3 | my_sqrt(a) = 1.73205080757 | math.sqrt(a) = 1.73205080757 | diff = 0.0
a = 4 | my_sqrt(a) = 2.0 | math.sqrt(a) = 2.0 | diff = 0.0
a = 5 | my_sqrt(a) = 2.2360679775 | math.sqrt(a) = 2.2360679775 | diff = 0.0
a = 6 | my_sqrt(a) = 2.44948974278 | math.sqrt(a) = 2.44948974278 | diff = 0.0
a = 7 | my_sqrt(a) = 2.64575131106 | math.sqrt(a) = 2.64575131106 | diff = 0.0
a = 8 | my_sqrt(a) = 2.82842712475 | math.sqrt(a) = 2.82842712475 | diff = 4.4408920985e-16
a = 9 | my_sqrt(a) = 3.0 | math.sqrt(a) = 3.0 | diff = 0.0
In this assignment, you will use all of the graphics commands you have learned to create an animated scene. Your program should have a clear theme and tell a story. You may pick any school-appropriate theme that you like.

The program must include a minimum of:

5 circles
5 polygons
5 line commands
2 for loops
1 global variable
You may wish to use the standard boilerplate code for simplegui graphics:

import simplegui

def draw_handler(canvas):



frame = simplegui.create_frame('Testing', 600, 600)
frame.set_canvas_background("Black")
frame.set_draw_handler(draw_handler)
frame.start()
How to make a script file and a plain text output file (.txt) that contains the test output?
LATEST TUTORIALS
APPROVED BY CLIENTS