Posted at 19:23h
in
archives
by admin
Question:
Eric works in a door mat manufacturing company. One day, he designed a new door mat with the
following specifications:
◦ Mat size must be A x B. (A is an odd natural number, and B is 3 times A.)
◦ The design should have ‘WELCOME’ written in...
Question 1:A spiral of numbers can start and end with any positive integers less than 100. Write a program which will accept two positive integers x and y as input, and output a list of numbers from x to y inclusive, shown in a spiral. You may assume that the end value is...
Posted at 19:00h
in
Uncategorized
by admin
Question:
Make a class definition for a BankAccount. It should have attributes for :
– its name (a string),
– account number (a string or integer),
– and balance (a float).
It should have methods to:
– make deposits with displaying the balance,
– and make withdrawals with displaying the balance.
Hint:
...
Posted at 15:27h
in
Uncategorized
by admin
Question:
Continue modify the program we made in the class:
The fighter will explode if the enemy or the bullet touches the fighter.
...
Question 1:
Most likely, you will notice that you have a mouse attached to your computer, which lets you move the cursor around the screen. Your job is to get between the mouse and the cursor.
Suppose that the bottom left-hand corner of your screen is (0,0),...
Posted at 01:26h
in
Uncategorized
by admin
Question 1:
Write a program using while loop. The program will ask the user to enter an ingredient for pizza. Every time you enter an ingredient, the program will show the message “We will add …. into your pizza.”, until you enter “quit”.
Sample:
Please enter an ingredient...