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

Write a method that builds an array by appending a given number of random two-digit integers. It should accept an array and how many values to add as parameters.
Print the array after calling the array.
Sample Run:
How many values to add to the array:
12
[14, 64, 62, 21, 91, 25, 75, 86, 13, 87, 39, 48]
Write a program to find the average of the numbers stored in NewYorkTemps.txt. Be sure your output uses floating point numbers (i.e. numbers with decimals).

NewYorkTemps.txt.
56.0
57.5
58.4
70.3
51.2
68.5
93.2
57.8
55.0
45.3
68.7
42.1
20.0
21.1
25.5
26.6
30.3
33.2
31.6
32.8
54.5
50.2
45.5
36.6
24.2
Write a program to find the average of the numbers stored in NewYorkTemps.txt. Be sure your output uses floating point numbers (i.e. numbers with decimals).

NewYorkTemps.txt.
56.0
57.5
58.4
70.3
51.2
68.5
93.2
57.8
55.0
45.3
68.7
42.1
20.0
21.1
25.5
26.6
30.3
33.2
31.6
32.8
54.5
50.2
45.5
36.6
24.2
Write a program which will provide the Python instructions to invoke
the following pseudocode design (HINT: using your earlier programs,
change this English language solution to a working Python format):
- Input salesperson's name preceeded by an appropriate
prompt to either enter the salesperson's name OR enter
"Q" to end.
- While not salesperson's name = "Q"
- Input sales on screen with appropriate prompt
- Print (on screen) salesperson's name; ", your sales are";
sales
- Print (on screen) a blank line
- Input salesperson's name or "Q" to end
- Print (on screen) "That's All Folks"
- End of program
In this program, you will create a personal organizer. Using parallel arrays you will store the following information on each event in your organizer:
Month (1 - 12)
Day (1 - 31)
Year

Event name
If the user enters an incorrect month the month should be set to January.
If the user enters an incorrect day then the day should be set to 1.
Write the following methods:
Add an event
Print all events
Print events in a specific month

Your program should follow how the sample run (below) asks for input and how it outputs events.
It should first keep asking for new events to add until the user says NO. Then, it should print all the events entered. Finally, it should ask the user for a specific month that he or she would like to see events from.
Write a program that takes input from user and prints “weird” if input is odd, “not weird” otherwise.
Write a program that accepts a time as an hour and minute. Add 15 minutes to the time, and output the result
1. A robot moves in a surface starting from the original point (0,0). The robot can move toward UP, DOWN, LEFT and RIGHT with a given steps. The trace of robot movement is shown as the following:
UP 5
DOWN 3
LEFT 3
RIGHT 2
The numbers after the direction are steps. Please write a python program to compute the distance from current position after a sequence of movement and original point.
Example:
If the following tuples are given as input to the program:
UP 5
DOWN 3
LEFT 3
XYZ 5
RIGHT 2
Then, the output of the program should be … (program should ignore XYZ)
The total number of steps moved by the robot is 13, and the distance moved is: 2.23
Write the definition of a class Player containing:
An instance variable name of type String, initialized to the empty String.
An instance variable score of type int, initialized to zero.
A method called set_name that has one parameter, whose value it assigns to the instance variable name.
A method called set_score that has one parameter, whose value it assigns to the instance variable score.
A method called get_name that has no parameters and that returns the value of the instance variable name.
A method called get_score that has no parameters and that returns the value of the instance variable score.
The telephone system of a travel agency is occupied 60% of the time.
a) (4) What is the probability that if 15 people call the agency, at least 12 of them get their calls answered.
b) (6) What is the probability that if 15 people call the agency, at least 8 but no more than 11 get their calls answered.
c) (6) Find the probability of needing more than 8 attempts in total so that three people will answer their calls.
LATEST TUTORIALS
APPROVED BY CLIENTS