Author: admin
Home > Articles posted by admin (Page 152)
Posted at 15:08h
in
archives
by admin
Question:
You supervise a small parking lot which has N parking spaces. Yesterday, you recorded which parking spaces were occupied by cars and which were empty. Today, you recorded the same information. How many of the parking spaces were occupied both yesterday and today?
Input Specification:
The first line of input contains the...
Posted at 21:40h
in
Uncategorized
by admin
Question:
Change the code in the method updateNumber(self, num) to complete the following task:
if you click 0 and the display is 0, the display will remain 0
if you click any number other than 0 and the display is 0, the display changed into the...
Posted at 21:35h
in
Uncategorized
by admin
Question:
Create an OunceConversion object to convert any number of fluid ounces to the equivalent number of gallons, quarts, pints, and gills. (There are 128 fluid ounces in a gallon. There are 32 fluid ounces in a quart. There are 16 fluid ounces in a pint. There are 4 fluid ounces in a...
Posted at 21:33h
in
archives
by admin
Question 1:
Create an OunceConversion object to convert any number of fluid ounces to the equivalent number of gallons, quarts, pints, and gills. (There are 128 fluid ounces in a gallon. There are 32 fluid ounces in a quart. There are 16 fluid ounces in a pint. There are 4 fluid ounces in...
Question 1:Winnie is feeling generous today, so she decided to adopt all the children in an orphanage. There are N orphanages, numbered from 1 to N, that she can choose from. Each orphanage has M children. Each children has a cuteness value ranging from 1...
Posted at 21:06h
in
Uncategorized
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...
Posted at 20:58h
in
Uncategorized
by admin
Question:You and your friend have come up with a way to send messages back and forth.
Your friend can encode a message to you by writing down a positive integer N and a symbol. You can decode that message by writing out that symbol N times in a row on...
Question:The students council in your school wants to organize a charity breakfast, and since older students are both wiser and richer, the members of the council decide that the price of each ticket will be based on how many years you have been in the...
Posted at 03:33h
in
Uncategorized
by admin
Question 1
Make a variable and assign a number to it (any number you like). Then display your variable using print.
Question 2
Modify your variable, either by replacing the old value with a new value, or by adding something to the old value. Display the new value using print.
Question 3
Make another...
Posted at 18:58h
in
Uncategorized
by admin
Question 1
Make a variable and assign a number to it (any number you like). Then display your variable using print.
Question 2
Modify your variable, either by replacing the old value with a new value, or by adding something to the old value. Display the new value using print.
Question 3
Make another...