Answer:
right clicking should be your answer
RIGHT ANSWER GETS BRAINLEST
Complete the code.
You are writing a loop to allow the user to enter data until they enter a "Q". You want to allow them to enter an upper- or lowercase "Q".
if yourTeam.
() == "q":
break
The options they give are:
Upper
Compare
lower
Answer:
sir i beleive lower is your answer, i know it isnt upper.
Explanation:
:D
Answer:
lower
Explanation:
i just did the quiz and got it right :)
How many comparisons will be done to find 8 in this list using a linear search?
2, 4, 6, 8, 10, 12
Answer:
I think 4 comparisons
An else statement will be executed in what situation?
the if statement is true
the if statement is false
there is a syntax error
the elif statement is executed
Answer:
The second one.
Explanation:
An `else` statement is like the alternative route for the code. I like to put it in my own words like, "If the user puts a number insted of a letter tell them they did a good job! Else(Otherwise) Tell them they need to try again.
I hope I helped!
Answer:
b) the if statement is false
Explanation:
The else statement is performed if the if statement's condition is not fulfilled. An else statement executes if an if statement is false. The else statement gives the code a backup if the if statement fails. If the if statement fails, this might propose a different course of action.
An if statement may test whether an integer is even or odd by dividing it by two. This tells the computer whether the number is even or odd. If the input number is divisible by 2, the software will print "the number is even" if it is the computer that determines whether the number is even or odd. If the input number is divisible by 2, the software will print "the number is even" if it is. The else statement may show that the "number is odd" if the integer cannot be divided by two.
In a particular spreadsheet, the data in each cell is password protected. When cells are selected, the formula is visible
in the formula bar. Which is true?
O The cells are locked and hidden.
The cells are locked and unhidden.
The cells are unlocked and hidden.
O The cells are unlocked and unhidden.
Answer:
Explanation:
Locked and hidden
The following code will not compile. Which of the options below would allow the code to compile and run as intended?
if (x >= -10 and <= 10):
print("In range")
Answer:
Follows are the code to this question:
x=int(input())#use input method with int that takes integer value from user-end
if (x >= -10 and x<=10):#defining if block that checks x in between -10 to 10
print("In range")#print message
Output:
6
In range
Explanation:
In this code, the choices were missing that's why the solution to this question can be defined as follows:
In this, x variable using the input method with the int, which takes integer value from the user-end. In the next step, the if block is used, that checks x value lies on between the -10 to 10, to check this condition it used the and logical operator, that run the code when both conditions are true, and at last, it prints the message "In range".
can someone help me on codehs. its 7.1.5: initials. here is what your supposed to do
Write a function called initials that will take a first and last name and return their initials using the following format:
initials("Tracy", "Turtle")
# => "T.T."
initials("Peter", "Parker")
# => "P.P."
Answer:
first = input( "What is your first name? " )
last = input( "What is your last name? " )
def initials():
print ("Your initials are: "+first[0]+"."+last[0]+".")
initials ()
Explanation:
it works when I test but it won't submit. Hope this helps
Following are the program to prints the initials of the input value.
Program Explanation:
Defining a class Main.Inside the class, a method "initials" is declared that takes two string variables "first, last" in the parameter.Inside the method, a return keyword is defined that uses the charAt method that returns the first character value of the parameters. In the next step, the main method is defined.Inside the main method, a print method is declared that calls initials method that accepts value in the parameter and prints its value.Program:
public class Main //defining a class Main
{
static String initials(String first, String last)//defining a String method initials that input two variables in the parameter
{
return first.charAt(0)+"."+last.charAt(0)+".";//using charAt method that returns first character value
}
public static void main(String[] as) //defining main method
{
System.out.println(initials("Tracy", "Turtle"));//using print method that calls initials method that accepts value in parameter
System.out.println(initials("Peter", "Parker"));//using print method that calls initials method that accepts value in parameter
}
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/2810164