Posted at 16:34h
in
Uncategorized
by admin
You can do Question 1~ 3 in Python IDLE shell:
Question 1.
Use float() to create a number from a string like ‘12.34’. Make sure the result is really a number!
Question 2.
Try using int() to create an integer from a decimal number like 56.78. Did the answer get rounded...
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...