Posted at 18:44h
in
Uncategorized
by admin
Question:
Because you somehow missed out on having a proper childhood, your friends are now forcing you to play a certain game for the first time – Super Mario Brothers. However, as a result of said missing-out, you find that you hate it. Who would want...
Question:
Create a Tank class which have the attributes of:
model
direction(use ‘up’, ‘down’, ‘left’ or ‘right’)
x position and
y position
The class also have the following method:
move () method can change the x or y position by 10 base on the tank’s direction. (‘up’ and...
Question:
Write a program to help you feed your friends at a party by doing some math about square pizzas. Your program need use input to ask the side length of the square pizza in cm. The area of the pizza should be computed using the...
Posted at 14:48h
in
Uncategorized
by admin
1. Which of the following statements is true?
A. A class is blueprint for the object.
B. You can only make a single object from the given class.
C. Both statements are true.
D. Neither statement is true.
2. What does the...
Question:
Because you somehow missed out on having a proper childhood, your friends are now forcing you to play a certain game for the first time – Super Mario Brothers. However, as a result of said missing-out, you find that you hate it. Who would want...
Question:
Write a Rectangle class in Python language, allowing you to build a rectangle with length and width attributes.
Create a getPerimeter() method to calculate the perimeter of the rectangle and an getArea() method to calculate the area of the rectangle.
Use print to show the length, width,...