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
EleoNora [17]
3 years ago
13

What is the difference between ‘’ and “” string type in python?

Computers and Technology
1 answer:
Mekhanik [1.2K]3 years ago
6 0

Answer:

There is no difference between ‘’ and “” string type in python. Both are used to hold the string or sequence of character in the python. triple """ """ can also use for the same.

Example:

str1 = "aeiou"

str2 = 'aeiou'

str3 =""" hello"""

print(type(str1), type(str2),type(str3))

<class 'str'> <class 'str'> <class 'str'>

Here all are used to hold string or sequence of character.

You might be interested in
The beginning statement of a loop is called a declaration.<br> True<br> False
Ilya [14]
It is true the reason why it is true is
4 0
3 years ago
Read 2 more answers
Is a defense of a political position an argument
shutvik [7]

Answer:

yes

Explanation:

yyyyyyyyyyeeeeeeeeesssssss

8 0
3 years ago
Name three situations when a copy constructor executes.
Vesna [10]

Answer:

1. When an object of the class is passed (to a function) by value as an argument.

2.  When an object is constructed based on another object of the same class.

3. When compiler generates a temporary object.

Explanation:

7 0
3 years ago
Write a program that performs a simulation to estimate the probability of rolling five of a kind in a single toss of five six-si
VikaD [51]

Answer:

import random

def probability_five_of_a_kind(num_trials):

   sums = 0

   for _ in range(num_trials):

       roll_1 = random.randrange(1,6, 1)

       roll_2 = random.randrange(1,6, 1)

       roll_3 = random.randrange(1,6, 1)

       roll_4 = random.randrange(1,6, 1)

       roll_5 = random.randrange(1,6, 1)

       collection = roll_1 + roll_2 + roll_3 + roll_4 + roll_5

       if collection == 5:

           sums += 1

   prob = round(sums/7776, 8)

   print(f"The probability_five_of_a_kind is {prob}")

   

probability_five_of_a_kind(100)

probability_five_of_a_kind(10000)

probability_five_of_a_kind(1000000)

Explanation:

The random package of the python language is used to select an integer value from the range of one to six representing the sides of a die. All six rolls are randomized and the sum. If the sum is equal to 5, the sums counter is incremented. At the end of the loop, the sum is divided by the five dices events (which is 6^5 = 7776).

8 0
2 years ago
Real GDP is found by removing the effects of inflation. How is this done mathematically?
tia_tia [17]
<span>B. By dividing Real GDP by (100/100-inflation rate).</span>
3 0
3 years ago
Other questions:
  • You can apply bold, italic, and underline styles to text. But why is it a good idea to use underline sparingly?
    13·2 answers
  • The term load is often used to describe opening a page in a ____. Answer
    11·1 answer
  • Which of the following best describes the 7x7 PowerPoint rule
    8·1 answer
  • Reading for subject content follows the same steps as reading for entertainment. True or false.
    10·2 answers
  • A(n) _________ is a lan that uses the same technologies as the internet but is provided to invited users outside the organizatio
    12·1 answer
  • Suppose that a laptop identifies its processor as follows: AMD’s A84500M. What does the AMD represent?
    5·1 answer
  • Worksheet Identify the devices for moving the cursor around your computer screen
    12·1 answer
  • U $ er Ideas for R 0 B 1 0 X?
    12·2 answers
  • Which statement about intellectual property is true? (CSI-7.6) Group of answer choices It is okay to use code you find on the in
    14·1 answer
  • If a computer uses 500 characters, how many bits this system requires to give different code to all characters?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!