Author: admin
Home > Articles posted by admin (Page 102)
Posted at 15:13h
in
Uncategorized
by admin
Question:
Problem DescriptionA fish-finder is a device used by anglers to find fish in a lake. If the fish-finder finds a fish, it will sound an alarm. It uses depth readings to determine whether to sound an alarm. For our purposes, the fish-finder will decide that...
Posted at 20:41h
in
Uncategorized
by admin
Question:
Create a wordReverse to reverse a string.
You need one argument (which is the original string) for the function
def wordReverse(word)
You must return the reversed string from the function.
For e.g The reverse of string “1234abcd” is “dcba4321”
Hint 1:
using len() to find out the length...
Continue with the code in the previous class and change the code such that the circle moves in both x direction and y direction.
The link to the code is below:
https://paste.ubuntu.com/p/pMWGFFzVnS/...
Posted at 20:38h
in
Uncategorized
by admin
Question:
You record all of the scoring activity at a basketball game. Points are scored by a 3-point shot, a 2-point field goal, or a 1-point free throw.
You know the number of each of these types of scoring for the two teams: the Apples and the...
Question:
You have to determine if it is possible to escape from a room. The room is an M-by-N grid with each position (cell) containing a positive integer. The rows are numbered 1, 2, . . . , M and the columns are numbered 1, 2,...
Question:
The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula:
BMI = weight / (height * height)
Write a program...
Posted at 20:16h
in
Uncategorized
by admin
Question:
Jack is sending a super special love letter, and because it is so special he doesn’t want anyone (except his crush obviously) to see it.
To stop it from getting into the wrong hands, he has decided to encrypt the letter with a Caeser Cipher (don’t...
Question:
You would like to do some experiments in natural language processing. Natural language processing (NLP) involves using machines to recognize human languages.
Your first idea is to write a program that can distinguish English text from French text.
After some analysis, you have concluded that a very...
Question 1:(please use function that return a value)
Write a program to display information to a driver based on his/her speed according to the following table:
km/h over the limit
Fine
1 to 20
$100
21 to 30
$270
31 or above
$500
Sample Input 1:
Enter the speed limit: 40
Enter the recorded speed of the...
Posted at 22:18h
in
Uncategorized
by admin
You could create python file and Write program for the following questions, detailed instructions as below:
Open Python IDLE
In Menu Bar, Click “File” => “New File”
In the file write your program
After finishing writing the program, click “Run”=>”Run Module” in menu bar or...