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
Elanso [62]
3 years ago
9

When reading data across the network (i.e. from a URL) in Python 3, what string method must be used to convert it to the interna

l format used by strings?
Computers and Technology
1 answer:
EastWind [94]3 years ago
7 0

Answer:

decode( )

Explanation:

We can use the method decode( ) to decode the string using the codec registered for encoding.

There are two parameters

encoding: We can encode with this parameter.

errors: If used to manage the errors.

For example:

String = "this is string example....wow!!!";

String = Str.encode('base64','strict');

If we print these variables we have:

String = b'dGhpcyBpcyBzdHJpbmcgZXhhbXBsZS4uLi53b3chISE='

String = this is string example....wow!!!

You might be interested in
What is the best brand of folders
kolezko [41]
Five star is what I hve used for years. They don't tear and are durable and have lots of colors
8 0
3 years ago
Read 2 more answers
Probability can be used to determine the likelihood of specific __________
kupik [55]
B occurrences because you taking the probability of something <span />
6 0
3 years ago
Read 2 more answers
Write a loop that reads positive integers from console input, printing out those values that are even, separating them with spac
AfilCa [17]

#include <iostream>

#include <vector>

std::vector<int> v;

int main(int argc, char* argv[]) {

   while(1) {

   int temp;

   std::cout << "\nEnter a number: ";std::cin>>temp;

   

   if(temp<0) {

       std::cout << "\nEven number(s) is/are:\n---------------------\n";

       for(int i=0;i<v.size();i++) {

           if(v.at(i)%2==0) std::cout << v[i] << " ";

           else continue;

       }

       std::cout << std::endl;

       break;

   }else {

       v.push_back(temp);

   }

}

   return 0;

}

3 0
2 years ago
Given a class called Measure that has the methods and data as specified, choose the correct code to satisfy the requirements of
Nina [5.8K]

Answer:

D

Explanation:

7 0
3 years ago
Write a program that prompts the user to input a number. The program should then output the number and a message saying whether
Gala2k [10]

Answer:

Following is the program in C++ Language

#include <iostream> // header file

using namespace std; // namespace std

int main() // main method

{

   int n;  // variable declaration

   cout<<" Please enter the number :";

   cin>>n; // Read the number

   if(n>0) // check the condition when number is positive

   {

cout<<n<<endl<<"The number is Positive"; // Display number

   }

  else if(n<0) // check the condition when number is Negative

  {

cout<<n<<endl<<"The number is Negative";// Display number

  }

  else // check the condition when number is Zero

  {

cout<<n<<endl<<"The number is Zero";// Display number

  }

   return 0;

  }

Output:

Please enter the number:

64

The number is Positive

Explanation:

Following are the description of the program

  • Declared a variable "n" of int type.
  • Read the value of "n" by user.
  • Check the condition of positive number by using if block statement .If n>0 it print the number is positive.
  • Check the condition of negative number by using else if block statement If n<0 it print the number is negative.
  • Finally if both the above condition is fail it print the message " The number is Zero"

7 0
3 years ago
Other questions:
  • Which computer device works like the human central nervous system by connecting all the computer’s parts together and allowing t
    9·1 answer
  • Which of the following statements is true of a database? a. It is a collection of unstructured data. b. It is accessed primarily
    14·1 answer
  • What is an additional clock tab
    11·1 answer
  • How to build an arch bridge​
    5·1 answer
  • All of the following activities may infect your computer with a virus EXCEPT ________.
    6·1 answer
  • In step 2 of the mail merge process you must be prepared to
    6·2 answers
  • Can anyone please help with this programming code in python num= 7 if num &gt; 3: print(“3”) if num &lt; 5: print(“5”) if num ==
    6·1 answer
  • What will the value of x be after the following statements execute? int x = 0; int y = 5; int z = 4; x = y z * 2;
    14·1 answer
  • A recommended cleaner for the bowls of coffee brewers is
    7·1 answer
  • PLEASE HELP I WILL GIVE BRAINLIEST!!!!
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!