Verify this claim. In other words, find four different positive integers a, b, c, and d, such that a3 + b3 = c3 + d3.
Use four nested for
loops (
one for a
,
one for b
,
one for c
, and
one for d
). You only need to go as high as 15 for
each variable. You are looking for values where
a**3 + b**3 == c**3 + d**3
, and also neither
of a
or b
is equal to c
or d
.
Save your program in a file called taxi.py
At each turn, print the height, the speed, and the fuel
remaining. Then, prompt the user for an amount of fuel to burn,
Mburn, for one second. Don't forget to convert the
output of raw_input
into a float
!.
If the player chooses more fuel than is available, Mburn should be set to the available amount.
If there is no fuel left, print "No more fuel!" and burn zero fuel (of course, bad things will likely ensue).
The game is won if the ship's height is less than 10 m, and its speed is less than 10 m/s. If the ship's height is negative, the game is lost.
Here are the physics equations needed for each turn (if you're a physics expert, I confess they are only approximate).
Save your program in a file called lander.py
mycourses.unh.edu
,
find CS414 and assignment 1, click the "Submit" button, and
upload
taxi.py
and
lander.py
.