Could YOU Please help me out of this question This is how I started typing but at the end I got stuck My half of the answers I attached. please Help I will give you brainiest


we will work on text processing and analysis. Text analyzers could be used to identify the language in which a text has been written (language detection), to identify keywords in the text (keyword extraction) or to summarize and categorize a text. You will calculate the letter (character) frequency in a text. Letter frequency measurements can be used to identify languages as well as in cryptanalysis. You will also explore the concept of n-grams in Natural Language Processing. N-grams are sequential patterns of n-words that appear in a document. In this project, we are just considering uni-grams and bi-grams. Uni-grams are the unique words that appear in a text whereas bi-grams are patterns of two-word sequences that appear together in a document.


Write a Java application that implements a basic Text Analyzer. The Java application will analyze text stored in a text file. The user should be able to select a file to analyze and the application should produce the following text metrics:


1. Number of characters in the text.

2. Relative frequency of letters in the text in descending order. (How the relative frequency that you calculated compares with relative letter frequencies in English already published?)

3. Number of words in the text.

4. The sizes of the longest and the shortest word.

5. The twenty most repeated uni-grams (single words) in the text in descending order.

6. The twenty most repeated bi-grams (pairs of words) in the text in descending order.


Test your program in the file TheGoldBug1.txt, which is provided.

Answers

Answer 1

The given program based on the question requirements is given below:

The Program

public static void analyzeChar(String text)

{

text = text.toLowerCase();

char [] characters = new char[26];

int [] rep =new int[26];

//populate the array of characters

char ch = 'a';

for (int i =0; i < characters.length; i++)

{

characters[i] = ch;

ch++;

}

itz72

//System.out.println(Arrays.toString(characters));

//System.out.println(Arrays.toString(rep));

//how many times each characters repeats

for (int i =0 ; i < text.length (); i++ )

{

ch = text.charAt(i);

if(ch>= 'a'&& ch<= 'z')

{

rep[(int)(ch-'a')]++;

}

itz72

}

//show the number of repetitions

for (int i = 0; i < rep.length; i++)

{

System.out.println("character" + characters[i] + "reapeats"+ rep[i]);

}

}

itz72

public static void calcNumChar(String text)

{

System.out.println("The number of characters is: " + text.length());

}

public static String getText(String fileName) throws IOException

{

String line = "", allText = "";

//open the file

File file = new File(fileName);

Scanner inputFile = new Scanner(file);

//read the file

while(inputFile.hasNext())

{

line = inputFile.nextLine();

//System.out.println(line);

allText=allText + (" " + line);

}

itz72

//close the file

inputFile.close();

return allText;

}

public static String getFilename()

{

String file;

Scanner kb = new Scanner(System.in);

System.out.print("Enter the name of the file: ");

file = kb.nextLine();

return file;

}

}

This script contains numerous functions that aid in the examination and manipulation of written materials. This program determines the incidence of every letter present in the supplied text, tallies the overall character count, and includes the ability to import text from a file.

Read more about programs here:

https://brainly.com/question/26497128

#SPJ1


Related Questions

list out various computer generation long with their basic characteristic ​

Answers

Answer:

1940 – 1956: First Generation – Vacuum Tubes. These early computers used vacuum tubes as circuitry and magnetic drums for memory. ... 1956 – 1963: Second Generation – Transistors. ... 1964 – 1971: Third Generation – Integrated Circuits. ... 1972 – 2010: Fourth Generation – Microprocessors

Explanation:

there are 4 generations ok

please mark me as brainlist

Write code to take two words from the user. The program should convert these to lower case, then compare them: printing a positive number if string1 appears after string2 alphabetically, a negative number if string1 appears before string2 alphabetically and zero if the two strings are identical. Make sure your program does not produce any additional numerical output other than this number or it may not be graded correctly.

Answers

Answer:

Use compareTo.

Explanation:

import java.util.Scanner;

public class U2_L3_Activity_Three{

 public static void main(String[] args){

   Scanner scan = new Scanner(System.in);

   System.out.println("Enter first word: ");

   String word1 = scan.nextLine();

   System.out.println("Enter second word: ");

   String word2 = scan.nextLine();

//I had to make the string all lowercase or all uppercase for when I did this

   word1 = word1.toLowerCase();

   word2 = word2.toLowerCase();

   System.out.println("Result: " + word1.compareTo(word2));

 }

}

Following are the program to converting string value into lowercase and compare with an input string value.

Program Explanation:

Import package.Defining a class Dat.Inside the class defining the main method, and in the method, two string variable "string1, string2" is declared.After input, the value a "toLowerCase" method is used that converts string value into lower case.  After converting value into the lower case a "compareTo" method is used that compares value and prints its value.

Program:

import java.util.*;//import package for input  

public class Dat //defining a Dat

{

public static void main(String[] ax)//main method

{

String string1 ,string2; //defining String variable

Scanner sc = new Scanner(System.in);//creating Scanner class object to input value

System.out.println("Enter values: ");//print message

string1= sc.next();//input value

string2= sc.next();//input value

string1= string1.toLowerCase();//convert string value into LowerCase  

string2 = string2.toLowerCase();//convert string value into LowerCase

System.out.println("Result: " + string1.compareTo(string2));//using compareTo method

}

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/15706308

Use EBNF notation to describe the syntax of the following language constructs.
A. A Java return statement, which could be either a return keyword followed by a semicolon, or a return keyword followed an expression then followed by a semicolon. Assume the grammar for expression has been defined as expr-> e
B. A Python return statement, either a return keyword, or return one or more expressions separated by comma.
C. Based on your syntax definition in (b), is return x+y; a valid Python return statement?

Answers

Answer:

Following are the description to the given points:

Explanation:

To resolve basic design restrictions, EBNF has also been developed.This principle was its lack of support can identify repeatings easily. It implies that popular BNF models, like the description of a sequence of replicable elements, are complicated and rely on contra intuitive logical math.

To set a list of words divided by commas (e.g. john, coffee, logic) for instance, we would like to say something like "a list is a word accompanied by a few commas or terms." Through EBNF, they may say so. However, there have been no "many" alternatives in the standard BNF format. So, to describe something such as "a list is a term or a number accompanied by a pair with notation and script," you have to say the same thing. Which functions, although it is difficult, as it specifies a variety of lists instead of a specific list.

Essentially, "john, coffee, logic is John's list, accompanied by coffees or, and logic" would be the earlier link.  That's why in Option (a):

The return statement in Java is:

return ('”‘ (~[“] | ” [”e‘])*);

In option (c), it is the valid statement.

Lets say if my computer shut down every 10 minutes. What can you do to solve the problem. Hint: Use these word in you answer: handy man, restart, shut down, call, and thank you.

Answers

Answer:

You should restart your computer

Answer:

You could call a handy man to take a look at your computer if you are having drastic issues. You could also restart or shut down you computer a few times because it might need a massive update. You might need to call the company  you bought your computer from and ask about what to do when that problem is happening. Thank you for reading my answer!

Explanation:

I think these answers make since.

Implement the function permutations() that takes a list lst as input and returns a list of all permutations of lst (so the returned value is a list of lists). Do this recursively as follows: If the input list lst is of size 1 or 0, just return a list containing list lst. Otherwise, make a recursive call on the sublist l[1:] to obtain the list of all permutations of all elements of lst except the first element l[0]. Then, for each such permutation (i.e., list) perm, generate permutations of lst by inserting lst[0] into all possible positions of perm.

>>> permutations([1, 2])

[[1, 2], [2, 1]]

>>> permutations([1, 2, 3])

[[1, 2, 3], [2, 1, 3], [2, 3, 1], [1, 3, 2], [3, 1, 2], [3, 2, 1]]

>>> permutations([1, 2, 3, 4])

[[1, 2, 3, 4], [2, 1, 3, 4], [2, 3, 1, 4], [2, 3, 4, 1],

[1, 3, 2, 4], [3, 1, 2, 4], [3, 2, 1, 4], [3, 2, 4, 1],

[1, 3, 4, 2], [3, 1, 4, 2], [3, 4, 1, 2], [3, 4, 2, 1],

[1, 2, 4, 3], [2, 1, 4, 3], [2, 4, 1, 3], [2, 4, 3, 1],

[1, 4, 2, 3], [4, 1, 2, 3], [4, 2, 1, 3], [4, 2, 3, 1],

[1, 4, 3, 2], [4, 1, 3, 2], [4, 3, 1, 2], [4, 3, 2, 1]]

Answers

Answer:

def permutations(myList: list)-> list:  

   if len(myList) <= 1:  

       return [myList]  

   perm = []  

   for i in range(len(myList)):  

      item = myList[i]  

      seglists = myList[:i] + myList[i+1:]  

      for num in permutations(seglists):  

          perm.append([item] + num)  

   return perm

 

data = [1,2,3]  

result = permutations(data)  

print(result)

Explanation:

The program defines a python function that returns the list of permutations. The program checks if the length of the input list is less than or equal to one. The function declaration identifies the input and output as lists.

The for loop iterate through the list and the permutations are saved in an empty list in the next loop statement. At the end of the program, the list of lists is returned.

Write a print statement that uses an f-string to output $5,242.83

Answers

Answer:

print("${:,.2f}".format(5242.83))

Explanation:

Given

$5,242.83

Required

Use an f string to output the above

The syntax of an f-string to format a number in that regard is: "${:,.2f}".format(number)

$ means that a dollar sign be printed before the required number

., means that the number be separated with commas

2f means that the number be presented in 2 decimal places

So:

"${:,.2f}".format(number) becomes

"${:,.2f}".format(5242.83)

In a print statement, the full instruction is:

print("${:,.2f}".format(5242.83))

What does the abbreviation JPEG stand for?
A. Japanese Photographic Examination Group
B. Joint Photo Examination Group
C. Joint Photographic Expert Group
D. Jefferson Photo Exclusive Group
E. Jacket Photo Extension Group

Answers

Answer:

c) giant photographic experts group

Answer:

C

Explanation:

(often seen with its file extension stands for

"Joint Photographic Experts Group",

You are asked to write a program that prompts the user for the size of two integer arrays, user input for the size must not exceed 50, you must validate this. We will use these arrays to represent our sets. These arrays will be randomly populated in the range that is 1 through double the size of the array. So if the array is of size 20, you will randomly populate it with values in the range 1-40 inclusive.

Answers

Answer:

In Java:

import java.util.*;

public class MyClass{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 System.out.print("Length of array 1: ");

 int lent1 = input.nextInt();

 while(lent1 <= 0 || lent1 > 50){

     System.out.print("Length of array 1: ");

     lent1 = input.nextInt();

 }

 int[] array1 = new int[lent1];

 System.out.print("Length of array 2: ");

 int lent2 = input.nextInt();

 while(lent2 <= 0 || lent2 > 50){

     System.out.print("Length of array 2: ");

     lent2 = input.nextInt();

 }

 int[] array2 = new int[lent2];

 for(int i =0;i<lent1;i++){

     array1[i] = (int)(Math.random() * (lent1*2) + 1);

 }

 for(int i =0;i<lent2;i++){

     array2[i] = (int)(Math.random() * (lent2*2) + 1);

 }

 System.out.print("Array 1: ");

 for(int i =0;i<lent1;i++){

     System.out.print(array1[i]+" ");

 }

 System.out.println("Array 2: ");

 for(int i =0;i<lent2;i++){

     System.out.print(array2[i]+" ");

 }

}

}

Explanation:

This prompts the user for length of the first array

 System.out.print("Length of array 1: ");

This declares and gets input for the length of the first array

 int lent1 = input.nextInt();

This validates the length of first array

 while(lent1 <= 0 || lent1 > 50){

     System.out.print("Length of array 1: ");

     lent1 = input.nextInt();  }

This declares the first array

 int[] array1 = new int[lent1];

This prompts the user for length of the second array

 System.out.print("Length of array 2: ");

This declares and gets input for the length of the second array

 int lent2 = input.nextInt();

This validates the length of the second array

 while(lent2 <= 0 || lent2 > 50){

     System.out.print("Length of array 2: ");

     lent2 = input.nextInt();  }

This declares the second array

 int[] array2 = new int[lent2];

The following generates random integers between 1 and lent1*2 to array 1

 for(int i =0;i<lent1;i++){

     array1[i] = (int)(Math.random() * (lent1*2) + 1);  }

The following generates random integers between 1 and lent2*2 to array 2

 for(int i =0;i<lent2;i++){

     array2[i] = (int)(Math.random() * (lent2*2) + 1);  }

This prints the header Array 1

 System.out.print("Array 1: ");

The following iteration prints the content of the first array

for(int i =0;i<lent1;i++){

     System.out.print(array1[i]+" ");

 }

This prints the header Array 2

 System.out.println("Array 2: ");

The following iteration prints the content of the second array

 for(int i =0;i<lent2;i++){

     System.out.print(array2[i]+" ");

 }

Write a SELECT statement that returns one row for each customer that has orders with these columns: The email_address from the Customers table

A count of the number of orders

The total amount for each order

(Hint: First, subtract the discount amount from the price. Then, multiply by the quantity.) Return only those rows where the customer has more than 1 order. Sort the result set in descending sequence by the total amount . Hint: You will join three tables together. Returns 3rows of data.

Questions done up until #4: https://pastebin.com/LwSKknPi

all questions before and after:

Write a SELECT statement that returns these columns:

The count of the number of orders in the Orders table

The sum of the tax_amount columns in the Orders table

Returns 1 row of data.

Write a SELECT statement that returns one row for each category that has products with these columns:

The category_name column from the Categories table

The count of the products in the Products table

The list price of the most expensive product in the Products table

Sort the result set so the category with the most products appears first.

Hint: You will join two tables together. Returns 3 rows of data.

Write a SELECT statement that returns one row for each customer that has orders with these columns:

The email_address column from the Customers table

The sum of the item price in the Order_Items table multiplied by the quantity in the Order_Items table

The sum of the discount amount column in the Order_Items table multiplied by the quantity in the Order_Items table

Sort the result set in descending sequence by the item price total for each customer.

Hint: You will join three tables together. Returns 7 rows of data.

Modify the solution to exercise 4 so it only counts and totals line items that have an item_price value that’s greater than 400. Returns 2 rows of data.

Write a SELECT statement that answers this question: What is the total amount ordered for each product? Return these columns:

The product name from the Products table

The total amount for each product in the Order_Items (Hint: You can calculate the total amount by subtracting the discount amount from the item price and then multiplying it by the quantity)

Use the WITH ROLLUP operator to include a row that gives the grand total.

Hint: You will join two tables together. Returns 10 rows of data.

Write a SELECT statement that answers this question: Which customers have ordered more than one product? Return these columns:

The email address from the Customers table

The count of distinct products from the customer’s orders

Hint: You will join three tables together. . Returns 3 rows of

Answers

Answer:

Please find the attachment files of the queries:

Explanation:

In the all queries the select statement is used that selects the defined columns and use the function like sum, join, orderby, and groupby to perform the various operations, in which the sum is used to add columns or rows values, join is used for joining two or more tables, and orderby is used for return the table into ascending or descending order, and groupby is used for the count the value, calculate average and perform other operation and gives its return value.

Which of the following closely represents the objective of the four dimensions in ITIL?
1. Handling of increased complexity of service management in modern scenarios
2. Holistic approach to Service management covering all key / aspects
3. Simplifying Service management to focus on only most critical aspects
4. Clear segregation of service management activities so that it can be assigned different functions/organizations

Answers

The option that closely represents the objective of the four dimensions in ITIL is Holistic approach to Service management covering all key / aspects.

What are the dimensions of service management ITIL?

They are:

PeopleProcessProducts or technologyPartners and suppliers.

Note that the four dimensions stands for the perspectives that are vital to right delivering value to customers and some stakeholders in the terms of products and services.

Hence, The option that closely represents the objective of the four dimensions in ITIL is Holistic approach to Service management covering all key / aspects.

Learn more about ITIL from

https://brainly.com/question/14098997

#SPJ1

The components of hardware include:
A) Monitor, CPU, Disk Drives, Printer, Keyboard/Mouse
B) Monitor, CPU, Disk Drives, Touch Screen, Keyboard/Mouse
C) Monitor, CPU, Software, Printer, Keyboard/Mouse
D) None of the above

Answers

Answer:

A

Explanation:

Monitor, CPU, Disk Drives, Printer, Keyboard/mouse

Answer:

B.monitor,cpu,disk drives,touch screen,keyboard/Mouse

We are supposed to go to the concert tomorrow, but it has been raining for three days straight. I just know that we won’t be able to go.

7. What is the author’s tone? ​

Answers

Its the worried tone

Hope this helps!

There Will Come Soft Rains is a warning story about nuclear war and how, in the end, technology won't keep us safe. In response to the atomic bombings of Hiroshima and Nagasaki, Bradbury penned the tale.

What author’s worried tone indicate about rain?

Ray Bradbury wrote the classic science fiction short tale “There Will Come Soft Rains” in 1950. The narrative is narrated in a detached, emotionless tone, as though the events that are taking place are a normal part of everyday life.

The story's meaning can be found in the story's complete lack of human beings, not even corpses.

Soft rain rays will appear in the short story. Bradbury creates a disorganized, somewhat post-apocalyptic atmosphere. To better understand the zeitgeist of the world, he employs a variety of literary techniques.

Therefore, It's the worried tone author’s.

Learn more about author’s here:

https://brainly.com/question/1308695

#SPJ5

Consider the security of a mobile device you use
(a) Explain how transitive trust applies to your use of an operating system on a
mobile device (e.g. smartphone). Then, explain how an attacker can exploit this
transitive trust to violate the CIA properties of the software and data on your
device

Answers

Answer:

keep it private

Explanation:

can anyone teach me the basics of lua scripts 50 points
like how do i tell lua to move a object or send me a prompt asking me to do something

Answers

Answer:

are you talking about about a game, or coding?

Do you think it's easier to be mean online than offline? why?

Answers

Answer:

Yes because on online we can talk all we want and they don't know us irl so it's funny lol

Explanation:

I have a question about this programming assignment. The outcome when the user puts in Taylor for guest one and Fernando for guest 2 should be, "Your party is ruined and another bad pop song will be written." However, it does not. What do I add to get this outcome? Do I need more brackets?

Answers

Yes u need more brackets

Use guestNumber1.equals(Fernando) instead of the double equal signs. You cant compare strings with ==

I need help Asap!!! So the question is "Compare and contrast Web page and Websites". ​

Answers

Answer:

A website is a mix of web pages while a web page is a single entity.

Explanation:

full meaning of ENDVAC

Answers

Answer:

EDVAC was one of the earliest electronic computers. Unlike its predecessor the ENIAC, it was binary rather than decimal, and was designed to be a stored-program computer. ENIAC inventors John Mauchly and J. Presper Eckert proposed the EDVAC's construction in August 1944.

Explanation:

Here is the full meaning

Fill in the missing terms relating to computer software

Answers

The missing terms relating to computer software are:

Utilitiesapplication software.What are Programs designed to perform specific tasks?

Programs that are made to carry out specific tasks is known as application software.

Note that An application software is said to be a computer software set up to carry out a group of coordinated functions and as such, The missing terms relating to computer software are:

Utilitiesapplication software.

Learn more about computer software from

https://brainly.com/question/1538272

#SPJ1

Q3: Create a class called Employee that includes three instance variables—a first name (typeString), a last name (type String) and a monthly salary (double). Provide a constructor that initializesthe three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, do not set its value. {Do not write a full program, only a class}

Answers

Answer:

Follows are the code to the given question:

public class Employee //defining a class Employee

{

String first_name,last_name;

Double monthly_salary;

Employee(String first_name,String last_name,Double monthly_salary)

{

   this first_name=f_name// initialize value in first_name

   this last_name = l_name; // initialize value in the last_name

    this monthly_salary = m_salary; // initialize value in the monthly_salary

if (monthly_salary < 0.0)//use if to check monthly_salary is positive

           monthly_salary = 0.0;//set value 0

}

void setfirst_name (String f_name)//defining set method to store first_name

{

first_name = f_name; //holding the value of first_name

}  

public String getfirst_name ()//defining get method to return first_name

{

return first_name;//return first_name

}  

public void setlast_name (String l_name)//defining set method to store last_name

{

last_name = l_name; // holding the value of the last_name

}

public String getlast_name ()//defining get method to return last_name

{

return last_name;//return last_name

}  

public void setmonthly_salary(double m_salary)//defining set method to store monthly_salary

{

monthly_salary = m_salary; // holding the value of the monthly_salary

}

public double getmonthly_salary ()//defining get method to return monthly_salary

{

return monthly_salary;//return monthly_salary  

}

}

Explanation:

In this code, a class "Employee" is declared that defines two string variables  "first_name,last_name", and one double variable "monthly_salary". In the next step, a parameterized constructor is defined that stores the value into the variable, and use if block to check "monthly_salary" is a positive. It also uses the getter and setter method to hold and return its value.  

   

In Linux, users are internally represented using a unique number called user ID or uid.

a. True
b. False

Answers

Answer:

a. True

Explanation:

An operating system is a system software pre-installed on a computing device to manage or control software application, computer hardware and user processes.

This ultimately implies that, an operating system acts as an interface or intermediary between the computer end user and the hardware portion of the computer system (computer hardware) in the processing and execution of instructions.

Some examples of an operating system on computers are QNX, Linux, OpenVMS, MacOS, Microsoft windows, IBM, Solaris, VM etc.

In Linux, users are internally represented using a unique number called user ID or UID. Thus, this unique number serves as an internal identifier in the Linux Kernel and as such determines what system resources may be accessible to each user. Oftentimes, these unique numbers are not put into use but rather a name is linked with the number and are used instead.

Also, users can be organized logically into a group and are represented uniquely with a group ID or GID, which serves as a global identifier for the users.

Cole has to edit and resize hundreds of photographs for a website. Which Adobe

software program would be the best choice to complete this task?

a.) Animate b.) Dreamweaver c.) Illustrator d.) Photoshop​

Answers

D.) Photoshop

Hope this helped, have a great day


Name the eight areas in which computers are used.
1.
2.
3.
4.
5.
6.
7
8.
s Review (Page 121​

Answers

Answer:

pakistan

india

usa

china

uk

afghanistan

iran

iraq

israel

Write a SELECT statement that returns three columns: VendorName from Vendors table, DefaultAccount No from Vendors table, AccountDescription from Invoice table. The result set should have one row for each vendor, with the account number and account description for that vendor’s default account number. Sort the result set by AccountDescription, then by VendorName

Answers

Answer:

SELECT VendorName, InvoiceNumber, InvoiceDate,

InvoiceTotal - PaymentTotal - CreditTotal AS Balance

FROM Vendors JOIN Invoices

ON Vendors.VendorID = Invoices.VendorID

WHERE InvoiceTotal - PaymentTotal - CreditTotal > 0

ORDER BY VendorName;

Answer:

C

Explanation:

. A digital computer has a memory unit with 24 bits per word. The instruction set consists of 150 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory.
a) How many bits are needed for the opcode?
b) How many bits are left for the address part of the instruction?
c) What is the maximum allowable size for memory?
d) What is the largest unsigned binary number that can be accommodated in one word of memory?

Answers

Explanation:

d answer

gzjxubejeiizbtozueg

Was Nick Carson a good project manager? Why or why not?

Answers

Answer:

Nick Carson is not a good project manager because he did not focus on all aspects of the project. He also failed to provide accurate schedules and also detailed plans on the happenings of the project. He was performing other jobs leaving aside the work of project manager. Without concerning and understanding the problem of top management he delivered the project.

Explanation:

the full meaning of ENIAC,ABACUS,EDVAC,EDSAC
and explain ​

Answers

Answer:

ENIAC: Electronic Numerical Integrator and Computer.

ABACUS: Abundant Beads, Addition and Calculation Utility System.

EDVAC: Electronic Discrete Variable Automatic Computer

EDSAC: Electronic Delay Storage Automatic Computer

when you value stored in a variable its previous value gets _________.
a) Accepted b) Overwritten c) Overlapped​

Answers

Answer:

B

Explanation:

You wore more a thu friends

It is important to create a strong password because it will

let someone steal your personal information
allow your friends to easily guess it
keep your private information safe and secure
give your computer a virus

Answers

Keeps your private information safe and secure...
PLP 2021

Hello! So I have been practising some coding, however, there seems to be an error in my code. I have been trying to figure out what is wrong, however, I just can't seem to find it. There is no syntax error but, there seems to be a problem with my input. I am currently using repl.it and I am making a calculator. I would input something like "multiply" however, the calculator would only square. I have tried changing the variables but it just keeps coming back to the first "if" statement. I would appreciate some help.

Answers

Answer:

You OR expressions are wrong.

Explanation:

Rather than writing:

  if method == "Square" or "square":

You should write:

  if method == "Square" or method == "square":

The expression should evaluate to something that is true or false.

In the above case, the expression is method == "Square" or method == "square" which can are actually two sub-expressions with an or in between them:

subexpr1 or subexpr2

each of the sub-expressions should evaluate to true or false.

method == "Square" is one of those sub-expressions.

That is how an expression is broken down by the compiler.

TIP: If you would add method = method.lower() right after the input, you could simplify all the if statements by removing the uppercase variants.

Other Questions
an experimental psychologist predicted students will learn reading faster using the new reading technique compared to the traiditional techniquea. one-tailedb. two-tailed EXERCISE 3 THE FOUNDER EFFECT Work in a small group to complete this exercise. In this exercise, you will simulate a case of the founder effect. STEP 1 Gather your lab materials. You should have: - 1 cup (which will hold the alleles for an entire population-the gene pool) - 20 red beans (representing the dominant allele (R) for a simple Mendelian trait) - 20 white beans (representing the recessive allele ( r ) for the same trait) Note: You may substitute other everyday objects (such as candies, coins, or paper clips) for the beans, but be sure to designate which objects represent the dominant versus recessive alleles. Test the series for convergence or divergence.n=1[infinity] n!/ 51117(6n1).n=1[infinity]n!51117(6n1).Which test is the best test to use for this series?Select Divergence Test Geometric Test p-Series Test Integral Test Comparison Test Alternating Series Test Ratio Test Root Test .Let's try Ratio Test:Compute limn[infinity]an+1an=limn[infinity]|an+1an|= . (Note: Use INF for an infinite limit, DNE if the limit does not exist.)Since the limit is Select > greater than or equal to = less than or equal to < not equal to , the Ratio Test tells us Select that the series converges absolutely that the series converges conditionally that the series diverges nothing . as part of the editing process, a researcher will check to ensure that _____.] In a no-fault divorce proceeding, which grievance could be requesting spouse list? (a) adultery (b) desertion (c) cruelty (d) no grievance is necessary. I need help with understanding this. give an account of paleys analogical argument and accounts of three of Hume's four obejectives to the teleological argument. Give a brief account of the fine-tuning teleological argument. How do current scientific theories (e.g. exolution and multiverse) challenge the teleological argument? the reason that the moon does not crash into the earth is the centrifugal force acting on the moon. true or false What are key characteristics of the User Datagram Protocol (UDP)? (Select Two responses) UDP does not implement a handshake O UDP handles the retransmission of packets UDP handles congestion automatically Packets do not necessarily arrive in order Data transfer is acknowledged A parabola has its directrix the line y = -1/2 and vertex at (0, 0) Determine the equation of the parabola described. larry, a u.s. citizen, opens and operates a bookstore in spain. this counts as in cows milk the most abundant protin casein redily binds to the coomassie dye molecule. (True or False) True/False: to see how copied contents will look with both values and number formatting, you would use paste numbers. Jasper Metals is considering installing a new molding machine which is expected to produce operating cash flows of $64,000 per year for 8 years. At the beginning of the project, inventory will decrease by $23,200, accounts receivables will increase by $24,600, and accounts payable will increase by $17,700. At the end of the project, net working capital will return to the level it was prior to undertaking the new project. The initial cost of the molding machine is $276,000. The equipment will be depreciated straight-line to a zero book value over the life of the project. The equipment will be salvaged at the end of the project creating an aftertax cash flow of $66,000. What is the net present value of this project given a required return of 10.9 percent? in regression analysis, quantitative variables assume meaningful numerical values but qualitative variables represent user interaction-based decomposition breaks down a product into the ______. make t the subject of the formula k=2(t+3)/t-3 help with heat transfer question a linear regression model yi = 0 1xi i (i = 1, 2, . . . , n) can be written as y= x where as part of a patient's balance training program, you have her walk across a balance beam and walk on her toes. the motor strategy this patient is most likely retraining is the