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...