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
s344n2d4d5 [400]
3 years ago
13

PLS HELP ME I HAVE NO TIME

Computers and Technology
1 answer:
melisa1 [442]3 years ago
6 0
Please Help! Unit 6: Lesson 1 - Coding Activity 2
Instructions: Hemachandra numbers (more commonly known as Fibonacci numbers) are found by starting with two numbers then finding the next number by adding the previous two numbers together. The most common starting numbers are 0 and 1 giving the numbers 0, 1, 1, 2, 3, 5...
The main method from this class contains code which is intended to fill an array of length 10 with these Hemachandra numbers, then print the value of the number in the array at the index entered by the user. For example if the user inputs 3 then the program should output 2, while if the user inputs 6 then the program should output 8. Debug this code so it works as intended.

The Code Given:

import java.util.Scanner;

public class U6_L1_Activity_Two{
public static void main(String[] args){
int[h] = new int[10];
0 = h[0];
1 = h[1];
h[2] = h[0] + h[1];
h[3] = h[1] + h[2];
h[4] = h[2] + h[3];
h[5] = h[3] + h[4];
h[6] = h[4] + h[5];
h[7] = h[5] + h[6];
h[8] = h[6] + h[7]
h[9] = h[7] + h[8];
h[10] = h[8] + h[9];
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
if (i >= 0 && i < 10)
System.out.println(h(i));
}
}
You might be interested in
Words or symbols that help you narrow down your search are called:
timurjin [86]

Answer:

c) search operators

Explanation:

Words or symbols that help you narrow down your search are called search operators. This ultimately implies that, search operators are commands and special characters (words or symbols) which help users to filter and refine their search engine results by making the search more precise and specific in nature. Thus, search operators only provide search engine results that are relevant to what a user is searching for or it narrow down the focus of a search.

Hence, search operators comprises of commands and special characters (words or symbols) such as AND, OR, NOT, "", -, +, *, .., :, etc used for narrowing down search engine results.

For instance, typing "file.mp3" in a search engine would only present results that are in mp3 formats.

7 0
3 years ago
g Create a program that prompts a user to enter a login name and password. The correct login name is Admin, and the correct pass
frutty [35]

Answer:

Answered below.

Explanation:

//Program in Python

login_name = "Admin"

password = "PASS"

display = " "

user_login_name = input ("Enter username: ")

user_password = input("Enter your Password: ")

if user_login_name == login_name and user_password == password:

display = "Correct Login"

elif user_login_name != login_name:

display = "wrong username"

elif user_password != password:

display = "wrong password"

print(display)

7 0
3 years ago
Wendy had been searching the internet for a great deal on jewelry. While looking at one site, a pop-up was displayed that told h
tigry1 [53]

Answer:

boot the computer from the windows installation disk and run startup repair

Explanation:

Based on the scenario being described within the question it can be said that the best option in this situation would be to boot the computer from the windows installation disk and run startup repair. This will analyze all windows files and clean up any files or malicious software that does not belong in order for the system to be able to correctly boot into the operating system. Then from inside the operating system you can run a full diagnostic of the system.

4 0
3 years ago
Look plz help :))))))))))))))))))))
andrey2020 [161]

Answer:

false

Explanation:the answer is false

6 0
3 years ago
Which of these devices can completely stop broadcasts from being passed on across the network? routerswitchaccess ponthub
cestrela7 [59]

Answer

An Access point can completely stop broadcasts from being passed on across the network.

Explanation.

An Access point is a hardware type that is part of local area network which has capability of allowing wireless communication from devices through a wireless stand,which connects in between devices and the network. A good example of these devices are routers that allows wireless devices to connect to a wireless network.So when it is passed on across a network an Access point can completely stop.

8 0
3 years ago
Read 2 more answers
Other questions:
  • You just realized the turn signal on your vehicle is broken,
    15·1 answer
  • A person can receive an electric shock by
    15·2 answers
  • Dani wants to create a web page to document her travel adventures. Which coding language should she use? HTML Java Python Text
    15·1 answer
  • A(n) ____________ specifies a variable's name and data type.
    5·2 answers
  • A _____ is an example of a systems program. A. command interpreter B. web browser C. text formatter D. database system
    10·1 answer
  • Assume you need to declare a type parameter that can represent any type that implements the interface Comparable. Which type par
    15·1 answer
  • What invention was key to computers being moved into homes and personal use?
    10·2 answers
  • After several rounds of sessions and reviews, you finally have a list of confirmed requirements from a client in the music indus
    8·1 answer
  • HELP ASAP 50 POINTS AND BRAINLIST PLZ NO FAKE ANSWER I BEG!!!!!!!!!!!!!!!!!!!!!!!!!!
    15·2 answers
  • PYTHON CODING QUESTION
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!