Posted at 17:40h
in
Uncategorized
by admin
Question 1:
Write a program that does the following:
Generates a random secret number between 1 and 100 (including 1 and 100).
Asks the user to guess the secret number, then tell them whether they guessed too low, too high, or exactly right.
Keeps the game going until...
Question:
Create a Tank object which have the attributes of:
name
direction(up/down/left/right)
x position and
y position
The object also have a method:
move (direction, steps)
Using __init__ to Initial the tank to make sure it start from x position of 0 and y position of 0
Print out the...
27 Oct js
Posted at 20:05h
in
code
by admin
test
avatar
aug13
Tank...
Posted at 03:37h
in
Uncategorized
by admin
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 which...
Posted at 03:34h
in
Uncategorized
by admin
Question :
write a program to ask user about the date(year, month and day), then calculate the day of the year.
Sample input:
Year: 2016
Month: 6
Day: 23
Sample output:
Day of the year: 175
Hint:
You need consider leap years and non leap years, in order to do easier calculation, you may...
Question:
Please write a program using function. Each player in a tournament plays six games. There are no ties. The tournament director places the players in groups based on the results of games as follows:
if a player wins 5 or 6 games, they are placed...