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
Vsevolod [243]
3 years ago
12

What is the error in this? userGuess = int(input(“Guess a number between 1 and 20: “))

Computers and Technology
1 answer:
Delvig [45]3 years ago
4 0

Most interpreters won't recognize “ “as a quote. You need to use " ". Other than that, your code looks good.

You might be interested in
Which task is not possible with VLOOKUP?
Flauer [41]

Answer:c

Explanation:

4 0
3 years ago
Read 2 more answers
Non related to school but im interested,<br><br> Who here actually watches dream smp be honest
Kamila [148]
I did- but I don’t anymore
3 0
2 years ago
Read 2 more answers
Who is the father of computer​
ehidna [41]
Charles Babbage
Xxxxxxxx
5 0
3 years ago
Read 2 more answers
1. Implement a method factorial(int n), that takes a number (int) and returns its factorial. Factorial of an integer is the prod
marysya [2.9K]

Answer:

import java.io.*;

import java.util.*;

public class Main

{

public static int factorial(int n){

if (n == 0)

return 1;    

else

return(n * factorial(n-1)); //recursively calling factorial function

}

public static void fibbonaci(int n)

{

if(n>0)

{

c=a+b; //next term in series

a=b;

b=c;

System.out.print(" "+c);    

fibbonaci(n-1); //recursively calling fibbonaci function

}

}

static int a=0,b=1,c;

  public static void main(String[] args) {

  int list_num,fact;

      List<Integer> num=Arrays.asList(1,3,5,7,9); //arraylist with 1,3,5,7,9

      for(Integer i:num) //for-each loop

      {    

      a=0;

      b=1;

      list_num=i.intValue();

      System.out.println("Fibbonaci series for "+list_num);

      System.out.print(a+" "+b);

      fibbonaci(list_num-2); //calling fibbonaci for values in list

      fact=factorial(list_num); //calling factorial for values in list

      System.out.println();

      System.out.println("Factorial for "+list_num+" is "+fact);

      System.out.println();

     

      }

  }

}

6 0
3 years ago
Pls help. will give brainliest to FIRST and CORRECT answer!
Zolol [24]

Answer:

All of the above

Explanation:

7 0
3 years ago
Other questions:
  • Which of the following are you likely to find between multiple school buildings in a city wide school district?
    9·1 answer
  • video-sharing sotes such as youtube and vimeo provide a place to post short videos called clips true or false?
    5·1 answer
  • . Two or more functions may have the same name, as long as their _________ are different.
    9·1 answer
  • Choose the statement that describes an advantage of paying a bill through the mail with a check.
    6·2 answers
  • When you need to cut new external threads on a bolt, which of the following tools should you use?
    9·2 answers
  • -Convert the 1's complement 10111010 to decimal
    15·2 answers
  • The response from a Google Form can be seen in how many ways?
    10·1 answer
  • What is the diffrent between ibm pc and ibm compatibles in table:​
    11·1 answer
  • An office uses an application to assign work to its staff members. The application uses a binary sequence to represent each of 1
    9·1 answer
  • Owen is writing a program that will lock his computer for one hour if the incorrect password is entered more than five times. Ha
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!