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
topjm [15]
2 years ago
12

In python, Create a conditional expression that evaluates to string "negative" if user_val is less than 0, and "non-negative" ot

herwise.
Computers and Technology
1 answer:
marshall27 [118]2 years ago
6 0

I am assuming that user_val is an inputted variable and a whole number (int)...

user_val = int(input("Enter a number: "))

if user_val < 0:

   print("negative")

else:

   print("non-negative")

You might be interested in
What are the steps in preparing a bootable USB installer?​
never [62]

Answer:

it's actually complicated

ifctxoycpyypg

6 0
3 years ago
1.) what is the minimum number of bits required to represent -3,997 using 2's complement form?
lisabon 2012 [21]

The binary representation of +3997 is 1111 1001 1101.

In one's complement this is simply adding a sign bit and inverting all the bits:

1 0000 0110 0010

The two's complement is the one's complement plus 1:

1 0000 0110 0011

That's 13 bits. Normally the sign bit would be at an 8, 16 or 32,... bit boundary.

For -436 it's 10 0100 1100 and 10 bits


8 0
3 years ago
You have just been named Director of Data Administration of General Hardware Co. General Hardware maintains a large central IS o
Afina-wow [57]

Answer:

Since General Hardware has a "huge, central IS organization," this organization ought to incorporate the two data administration and database administration departments.

The data administration department will be required to deal with the full scope of data administration duties regarding the whole corporation, both at the central station and at the local offices.

The central database administration department will give the standard operational database administrations for the home office databases.

It will likewise give direction and coordination to the individuals at the provincial offices who are answerable for their databases.

Obviously, database administration will likewise be answerable for the daily data downloads alluded to.

Data administration and database administration will increase the value of the corporation by making arrangements for and overseeing data as a corporate asset with the objective of increasing an upper hand from it.

Explanation:

5 0
3 years ago
Fill in the blank: Every database has its own formatting, which can cause the data to seem inconsistent. Data analysts use the _
dmitriy555 [2]

The tool used by data analysts to create a clean and consistent visual appearance for their spreadsheets is called <u>clear formats</u>.

A database refers to an organized or structured collection of data that is typically stored on a computer system and it can be accessed in various ways. Also, each database has a unique formatting and this may result in data inconsistency.

In Computer science, a clean data is essential in obtaining the following:

  • Data consistency
  • Data integrity
  • Reliable solutions and decisions.

Furthermore, spreadsheets are designed and developed with all kinds of tools that can be used to produce a clean data that are consistent and reliable for analysis.

In this context, clear formats is a kind of tool that is used by data analysts to create a clean and consistent visual appearance for their spreadsheets.

Read more on database here: brainly.com/question/15334693

8 0
2 years ago
Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
mezya [45]

Answer:

Follows are the code to this question:

import java.util.*;//import packae for user-input  

public class Main//defining a class Main

{

public String[] getArray(int numString)//defining a method getArray

{

String[] name=new String[numString];//defining array of String values

Scanner in = new Scanner(System.in);// creating scanner class object for input values from user-end

for(int i=0;i<numString;i++)//defining for loop for input multiple values

{

System.out.print("Enter String Value :");//print message

name[i]=in.nextLine();//input values

}

return name;//return array values

}

public String getLongestString(String[] sArray)//defining a method getLongestString

{

int m=0,mi=0; //defining integer variables

for(int i=0;i<sArray.length;i++)//defining for loop for check the longest value in array

{

if(m<sArray[i].length())//defining if block that checks m varaible value greater then sArray length  

{

m=sArray[i].length();//use m to hold sArray length

mi=i;//use max_index to hold i that is loop value

}

}

return sArray[mi];//return Longest value

}

public static void main(String[] args)//defining main method

{

Main s=new Main();//Creating object of main class    

String[] n;//defining string variable n  

n=s.getArray(5);//use n varaible to call getArray method and store its value

System.out.println("Longest value is: "+s.getLongestString(n));//use print method to call getLongestString method

}

}

Output:

please find attached file.

Explanation:

In the given java program code, inside the main class two method that is "getArray and getLongestString", is defined, in which the "getArray" method uses an integer variable in its parameter and inside the method, an array is defined that use a  scanner class for input array value.

  • In the "getLongestString" pass as a parameter and inside the method, two integer variable "m and mi" is defined that use in the loop to return the longest string value.
  • In the class main method is to define that creates a class object and call the above method and use the print method to return its value.  

4 0
3 years ago
Other questions:
  • In which setting would you be least likely to find a full-time A/V technician?
    5·2 answers
  • How do you delete text from a slide
    14·2 answers
  • Software that was designed to serve the needs of a specific company or organization is called:
    5·1 answer
  • 5. The hazardous component in most antifreeze is _____, which is extremely toxic to humans and animals. A) Calcium Carbonate B)
    13·2 answers
  • A _____ defines what must take place, not how it will be accomplished.​
    12·1 answer
  • Which is the best programming practice?
    6·1 answer
  • A friend was just promoted to a new job that requires part-time travel, and he has also been promised a new laptop after his fir
    10·1 answer
  • Write two cin statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a dash,
    7·1 answer
  • What is the Slide Sorter View used for?
    12·2 answers
  • 9.4 Code Practice: Your task is to determine whether each item in the array above is divisible
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!