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

Write a function that takes a list as a parameter, converts every element in the list to integar and then returns a tuple compri

sing of these integar elements. If the function encounters a character such as 'p' that cannot be converted to an integar, it throws this error message on the screen: "Error. Please enter only integers."

Computers and Technology
1 answer:
abruzzese [7]3 years ago
6 0

Answer:

Following is given the solution of your question as required.

All the necessary descriptions are given in form of comments,

Sample output are also shown.

I hope it will help you!

Explanation:

You might be interested in
Did the Z3 computer invented by Konrad Zuse have a negative effect on society?
musickatia [10]

Answer:

Explanation:

Không

4 0
2 years ago
Read 2 more answers
In c please
Paraphin [41]

Answer:

#include <stdio.h>

#include <ctype.h>

void printHistogram(int counters[]) {

   int largest = 0;

   int row,i;

   for (i = 0; i < 26; i++) {

       if (counters[i] > largest) {

           largest = counters[i];

       }

   }

   for (row = largest; row > 0; row--) {

       for (i = 0; i < 26; i++) {

           if (counters[i] >= row) {

               putchar(254);

           }

           else {

               putchar(32);

           }

           putchar(32);

       }

       putchar('\n');

   }

   for (i = 0; i < 26; i++) {

       putchar('a' + i);

       putchar(32);

   }

}

int main() {

   int counters[26] = { 0 };

   int i;

   char c;

   FILE* f;

   fopen_s(&f, "story.txt", "r");

   while (!feof(f)) {

       c = tolower(fgetc(f));

       if (c >= 'a' && c <= 'z') {

           counters[c-'a']++;

       }

   }

   for (i = 0; i < 26; i++) {

       printf("%c was used %d times.\n", 'a'+i, counters[i]);

   }

   printf("\nHere is a histogram:\n");

   printHistogram(counters);

}

5 0
2 years ago
c++ Write a statement that increments (adds 1 to) one and only one of these five variables: reverseDrivers parkedDrivers slowDri
Mazyrski [523]

Answer:

The following statement are:

if(speed < 0) // if statement

{

reverseDrivers++; //if the speed is less than 0, then increment in "reverseDrivers"

}

else if(speed < 1) //else if statement

{

parkedDrivers++; //speed is less than 1, than increments in "parkedDrivers"

}

else if(speed < 40)

{

slowDrivers++; //speed is less then 40, than increment in "slowDriver"

}

else if(speed <= 65)

{

safeDrivers++; //speed is less than or equal to 40, then increment in "safeDriver"

}

else

{

speeders++; //else increment in speeders

}

Explanation:

From the following statement their are certain condition arises

If the speed is less than 0, then increments the “reverseDrivers” variable by 1.

If the speed is less than 1, then increments the “parkDriver” variable by 1.

If speed is less than 40, then increment in "slowDriver" variable by 1.

If speed is less than or equal to 40, then increment in "safeDriver" variable by 1.

Otherwise increment in "speeders"

7 0
3 years ago
Write one line of code to print animals, an array of Animal objects.
oksian1 [2.3K]

Answer:

console.log(Animal);

Explanation:

The statement written above prints the array Animal which contains objects.There are two to three ways to print the array Animal in javascript. One of the method is written in the answer it prints the arrays in the console of the browser.

You can go to the console by pressing F12 and then clicking on the console.

Other methods to print are

  1. Simple write Animal after defining the array.
  2. Use alert.
  3. document.write()
7 0
3 years ago
Brian needs to assign a macro to a button on the ribbon. Where should he go to achieve this goal?
8_murik_8 [283]

Answer: A. Record Macro dialog box.

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • When reading a ____ language, we use our understanding of the richness of the language's vocabulary to extract the meaning. geop
    10·1 answer
  • What are the only things that can be declared in an interface?
    11·1 answer
  • What natural resources fueled industrialization in the united states?
    14·1 answer
  • In this exercise, you are given a phrase and need to return that phrase in all capital letters.
    6·1 answer
  • Can you make copies of classified documents provided you alert others?
    6·1 answer
  • While the Internet can be a great resource, the information is not always reliable, as anyone can post information. Select one:
    11·1 answer
  • Which one of these tasks is part of the pre-production phase of game development?
    11·2 answers
  • Assume that a is an array of two or more integers, and that b and c are integers.
    13·1 answer
  • How to bypass a Lightspeed and Rocket Filter blocked website without being a admin and without downloading extensions? Must incl
    15·1 answer
  • A major public university graduates approximately 10,000 students per year, and its development office has decided to build a We
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!