Answer:
public static void print_popcorn_time(int bag_ounces){
if(bag_ounces<3){
System.out.println("Too Small");
}
else if(bag_ounces>10){
System.out.println("Too Large");
}
else{
bag_ounces*=6;
System.out.println(bag_ounces+" seconds");
}
}
Explanation:
Using Java prograamming Language.
The Method (function) print_popcorn_time is defined to accept a single parameter of type int
Using if...else if ....else statements it prints the expected output given in the question
A complete java program calling the method is given below
public class num6 {
public static void main(String[] args) {
int bagOunces = 7;
print_popcorn_time(bagOunces);
}
public static void print_popcorn_time(int bag_ounces){
if(bag_ounces<3){
System.out.println("Too Small");
}
else if(bag_ounces>10){
System.out.println("Too Large");
}
else{
bag_ounces*=6;
System.out.println(bag_ounces+" seconds");
}
}
}
Answer:
def newton(n):
#Define the variables.
t = 0.000001
esti = 1.0
#Calculate the square root
#using newton method.
while True:
esti = (esti + n / esti) / 2
dif = abs(n - esti ** 2)
if dif <= t:
break
#Return the result.
return esti
#Define the main function.
def main():
#Continue until user press enters.
while True:
try:
#Prompt the user for input.
n = int(input("Enter a number (Press Enter to stop):"))
#display the results.
print("newton = %0.15f" % newton(n))
except:
return
#Call the main function.
main()
Answer:
•Make sure doorway openings are at least 32 inches wide and doorway thresholds are no higher than 1/2 inch.
•Keep aisles wide and clear for wheelchair users.
•Make sure all levels of the lab are connected by a wheelchair-accessible route of travel.
For students with mobility impairments, make sure there are procedures in place for retrieving materials that may be inaccessible.
Make sure ramps and/or elevators are provided as an alternative to stairs. Elevators should have both auditory and visual signals for floors. Elevator buttons should be marked in large print and Braille or raised notation and easily reachable for wheelchair users.
Locate the lab near wheelchair-accessible restrooms with well-marked signs.
Service desks need to be wheelchair-accessible.
Provide ample, high-contrast, large-print directional signs throughout the lab. Mark equipment in the same fashion.
Provide study carrels, hearing protectors, or private study rooms for users who are easily distracted by noise and movement around them.
Provide at least one adjustable-height table with easily reachable controls for each type of computer.
Have wrist rests available to those who require extra wrist support while typing.
Keep document holders available to help users position documents for easy reading.
I think it’s a
if it isn’t a then it’s d