1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Paraphin [41]
3 years ago
13

6. Choose the TWO conditions that could be used for an IF-statement, without a compile-time error. Assume variable str is a Stri

ng type variable. Assume double-quotes indicate String values.

Computers and Technology
1 answer:
KengaRu [80]3 years ago
3 0

Answer:

  1. 4 ==5
  2. "six"== 6

Explanation:

You might be interested in
Assuming that the message variable contains the string "Happy holidays", the statement message.find("days"); returns a. -1b. 10c
katrin [286]

Answer:

Answer is b. 10                

Explanation:

The find() method is used to search the string for a specified value and searches the first occurrence of that value. It returns the position of that specified value. If the value is not found, this method returns -1.

Lets say we have a message variable that contains the string Happy holidays.

message = "Happy holidays"

We use the method find() to find days word from the Happy holidays string in the message variable.

The find() method will find the position of day.

If we look at the string Happy holidays we see that the word day is at the 10th position of the string.

H     1

a      2

p      3

p      4

y      5

h      6

o      7

l       8

i       9

d      10

a      11

y      12

s      13

So it is at 10th position so the statement

message.find("days")

returns 10

7 0
3 years ago
22. Which of the following device will you require to hear music on
Anon25 [30]

Answer: None

Explanation:

I don’t even knew these.

4 0
3 years ago
Package Newton’s method for approximating square roots (Case Study 3.6) in a function named newton. This function expects the in
notka56 [123]

Answer:

import math

#Initialize tolerance

tolerance = 0.000001

def newton(x):

   """ Returns the square root of x """

   #Performs the successive approximations

   estimate = 1.0

   while True:

       estimate = (estimate + x / estimate) / 2

       difference = abs(x - estimate ** 2)

       if difference <= tolerance:     # Break out of loop if difference is less than tolerance

           break            

       return estimate     # While the difference value is > TOLERANCE, the process continues

def main():

   """Allows the user to obtain square roots."""

   while True:

       #Receive the input number from the user

       x = input("Enter a positive number or enter/return to quit: ")

       if x == "":     #if user presses "Enter" then exit the program

           break       # Otherwise, continue the process of allowing new numbers

       x = float(x)

       #Output the result

       print("The programs estimate of the square root of ", x, "is ", round(newton(x),2))

       print("Python's estimate: ", math.sqrt(x))

main()

8 0
3 years ago
Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMile
lina2011 [118]

Answer: 40, 4

Explanation:

8 0
3 years ago
Please answer fast as soon as possible.
zhenek [66]

Answer:

1. Scripts area is the main working area in Scratch.

2. Sensing blocks are color-coded light blue.

3. Adware is a malware which pops up a window, informing the user that the system is infected and asks for a fee to clean it.

4. Amaya is a WYSIWYG.

8 0
2 years ago
Other questions:
  • Which app is not a free app that your Microsoft account gives you access to
    6·1 answer
  • Using features on demand results in saving potentially significant amounts of disk space. features on demand becomes a third ins
    14·1 answer
  • Who develop punch card​
    7·1 answer
  • What does the rule of five say?
    12·2 answers
  • 2. Use inheritance to create a hierarchy of Exception classes -- EndOfSentenceException, PunctuationException, and CommaExceptio
    6·1 answer
  • Need help with just #8
    12·1 answer
  • What are the two basic categories of film
    5·1 answer
  • _____ refers to the busiest calling hour of the day, week, month or year. And _____ refers to the average length of time the sub
    14·1 answer
  • Can i edit my name on this app?
    7·1 answer
  • Write a program that simulates applying a "boost" to a spaceship in a spaceship race game.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!