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
nignag [31]
3 years ago
8

Halp Computer Science

Computers and Technology
2 answers:
oee [108]3 years ago
6 0
The first one is GUI
the second one is directory
ArbitrLikvidat [17]3 years ago
4 0

1st: GUI

2nd: directory

You might be interested in
When powering off your computer is best down using?
MAXImum [283]

command prompt shutdown/s or alt f4


7 0
3 years ago
Read 2 more answers
Write a function called count_occurrences that takes two strings. The second string should only be one character long. The funct
iVinArrow [24]

Answer:

Here is the Python function:

def count_occurrences (string1 , string2):  # method that takes two strings as parameter and returns how many times second string occurs in first

   count = 0  #counts number of occurrence of string2 in string1

   for word in string1:  #iterates through each word of the string1

       for character in word:  #iterates through each character of each word in string1

           if character == string2:  # checks if the character in string1 is equal to the character of string2

               count = count + 1  #adds 1 to the count of string2 in string1

   return count  #returns number of times the string2 occurs in string1

#in order to check the working of the function add the following lines to the code:    

first_str = input("Enter the first string: ")  #prompts user to enter first string

second_str = input("Enter the second string (one character long): ") #prompts user to enter second string which should be one character long

occurrence = count_occurrences(first_str,second_str)  #calls count_occurrences method by passing both strings to it

print(second_str,"occurs",occurrence,"times in",first_str) #prints how many times the second_str occurs in the first_str on output screen

Explanation:

The program is well explained in the comments added to each statement of the above code. I will explain the program with an example:

Suppose

string1 = "hello world"

string2 = 'l'

So the method count_occurrences() should return how many times l occurs in hello world.

count is used to count the number of occurrences of l in hello world. It is initialized to 0.

The first loop iterates through each word of string1. The first word of string1 is "hello"

The second loop iterates through each character/letter of each word. So the first letter of "hello" word is 'h'.

The if condition if character == string2: checks if the character is equal to string2 i.e. l.

character = "h"

string2 = "l"

The are not equal so the program moves to the next character of word hello which is e. The if condition again evaluates to false because e is not equal to l. So the program moves to the next character of word hello which is l.

This time the if condition evaluates to true because

character = "l"

string2 = "l"

character == string2

l == l

So the if part is executed which has the following statement:

count = count + 1

So the count is added to 1. count was 0 previously. Now

count = 1

Next the program moves to the next character of word hello which is l. This time the if condition evaluates to true because the character l matches with string2. So count is again incremented to 1. count = 2.

Next the program moves to the next character of word hello which is o. The if condition evaluates to false as o does not match with string2 i.e. l. So the count remains 2.

Next the first loop moves to the next word of the string1 = "world". The inner (second) for loop iterates through each character of "world" from "w" to "d" and checks if any character is equal to string2. Only one character is equal to string2 in "world". So count is incremented to 1. Hence count = 3

After the loop ends the statement return count returns the number of times string2 occurs in the string1. So the output is:

l occurs 3 times in hello world  

8 0
3 years ago
You would like to enter a formula that subtracts the data in cell B4 from the total of cells B2 and B3. What should the formula
anastassius [24]

Answer:

=b2 b3-b4 or something close to that, I hope this helps ^^

Explanation:

6 0
3 years ago
Assume you are given three variables, revenue, expenses, and profit, all of type Money (a structured type with two int fields, d
Andre45 [30]

Answer:

if(revenue.cents - expenses.cents < 0){

profit.dollars = revenue.dollars - expenses.dollars - 1;

profit.cents = 1 - revenue.cents - expenses.cents;

}

else{

profit.dollars = revenue.dollars - expenses.dollars;

profit.cents = revenue.cents - expenses.cents;

}

Explanation:

We know that profit is given as: revenue - expenses from the question.

From the given expression above;

if(revenue.cents - expenses.cents < 0)

then profit.dollar will be revenue.dollars - expenses.dollars - 1; the 1 is to be carry over to the cent part. And the profit.cent will be 1 - revenue.cents - expenses.cents;

else the profit.dollars and the profit.cent is computed directly without needing to carry over:

profit.dollars = revenue.dollars - expenses.dollars;

profit.cents = revenue.cents - expenses.cents;

7 0
2 years ago
How do I turn of the noise canceling feature on my beats studio wireless?
zysi [14]
You press and hold the "b" button on your left earmuff, but you have to hold it down as long as you want ANC (Automatic Noise Cancelling) to be turned off, in other words, as soon as you release the button, ANC will be turned back on. Unfortunately, this will also mute your music. 
5 0
3 years ago
Other questions:
  • ​to prevent intrusions, companies install combinations of hardware and software called _____ to keep unauthorized web users from
    9·1 answer
  • Driving while wearing headphones or earphones
    12·2 answers
  • You type a web address in your web browser. order the steps, which describe the internet name resolution process for the web add
    7·1 answer
  • Consider the following C++ program in which the statements are in the incorrect order. Rearrange the statements so that itprompt
    6·1 answer
  • PLEASE HELP ASAP!!! 99 POINTS FOR 3 MULTIPLE CHOICE QUESTIONS!!! PLEASE ANSWER ALL!!!
    8·1 answer
  • Question # 7
    11·1 answer
  • 24 POINTS!!! <br> Why are Sequences, Selection, and Iteration building blocks of algorithms?
    5·1 answer
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
  • WHAT ARE THE USES OF COMPUTER SCIENCE AND INFORMATION TECHNOLOGY
    13·1 answer
  • List one unprofessional AND one professional example of internet/social media
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!