The code below is supposed to make alex move North 150 pixels and then move East 75, but the lines are in the wrong order. Fix it so that it runs properly. Remember that the turtle is facing east (right) at the start.
There are 2 syntax errors (errors that prevent the code from running) in the following code. There is also a missing space in one of the strings that will be printed. Fix the code so that it prints exactly this: βYour name is Carly and your favorite color is red.β.
== is an operator that checks for equality. If the value on the left side is equal to the value on the right side, it gives True. Otherwise it gives False.
Complete the code on lines 3 and 5 below to print the cost of a car trip of 500 miles when the car gets 26 miles per gallon and gas costs 3.45 a gallon. In line 3, you need to determine the number of gallons the care used if they went 500 miles and the car gets 26 miles per gallon, but make sure you use the variables in your formula. In line 5, compute the cost of the trip using numGallons and pricePerGallon.
Assume it is currently 10:00 AM. Complete the code to tell what time it is going to be in 18 hours (using 12-hour time, not 24-hour time). Use the % (modulo or remainder operator) to calculate the correct value for clockTime based on the newTime value that is already calculated.
The answer should be 4 because 28 hours divided into 12-hour chunks leaves a remainder of 4. But make sure not to hardcode the answer - you need to calculate the value, not just type it in.
Finish the code on lines 2 and 3 in the code below to print how many hours and minutes you have been waiting when you have been waiting a total of 270 minutes.
Use the % (modulo or remainder operator) and the integer division operator // to calculate the correct values for numHours and numMinutes based on the totalMinutes value.