Posted at 17:16h
in
archives
by admin
Question:
Create a Tank class which have the attributes of:
name
direction(use 'up', 'down', 'left' or 'right')
x position and
y position
The class also have the following method:
move (self, direction, steps)
Using __init__() to Initial the tank to make sure it start from x position...
Posted at 17:04h
in
Uncategorized
by admin
Question:
You’re on a long car trip and arrive at a gas station. It’s 200 km to the next station. Write a program to figure out if you need to buy gas here, or if you can wait for the next station.
Input Specification:
The program should ask these questions,...
Posted at 06:44h
in
archives
by admin
Question:
A store is having a sale. If the customer purchased 10 dollars or more, the store will give $2 off. Please write a program to ask how much the customer has bought. The program will show the discount and the final price the customer has...
Question:
Use TKinter to create 6 buttons as following picture:
...
Posted at 03:39h
in
Uncategorized
by admin
Question:
A store is having a sale. They’re giving 2 dollars off purchases of $10 or lower, and 3 dollars off purchases of greater than $10. However, there's no discount if you purchase less than 5 dollars. Write a program that asks the purchase price and...
Posted at 03:20h
in
archives
by admin
Question :
In mathematics, the factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n:
n!=n*(n-1)*(n-2)*(n-3)*...