The unit of measure and decimal precision apply to the acceptable values for test measurements and to the reporting of test results for quantitative tests.
Единицы измерения и точность в десятичных знаках применяются к соответствующим значениям измерений в ходе проверки и к результатам проверки для проверок количества.
Orthodox Christianity and traditionalist values are now central to the regime’s discourse.
Православное христианство и традиционные ценности оказались центральной темой режима.
It also identified a need for developing ammonia emissions data and procedures to review submitted data.
Была также подчеркнута необходимость получения более полных данных о выбросах аммиака и разработки процедур обзора представленных данных.
If the treaty goes down in the Senate or the Russian State Duma — or isn’t submitted for ratification because the votes aren’t there — it might still inflict damage on ties between Washington and Moscow.
Если договор потерпит неудачу в Сенате или в российской Государственной Думе или не будет подан на ратификацию из-за недостаточного числа голосов – это уже серьезно повредит связям между Вашингтоном и Москвой.
Both Piotr and Lech are from Poland.
И Пётр, и Лех из Польши.
If the price crosses Parabolic SAR lines, the indicator turns, and its further values are situated on the other side of the price.
Если цена пересекает линии Parabolic SAR, то происходит разворот индикатора, а следующие его значения располагаются по другую сторону от цены.
Birth certificates, church records, even whole family trees are submitted for consideration.
Свидетельства о рождении, церковные записи, на рассмотрение представляются даже целые фамильные древа.
It looks like you are from India.
Похоже, что вы из Индии.
• Generally, if the %K value rises above the %D, then a buy signal is indicated by this crossover, provided the values are under 80.
вообще, если линия %К растет выше линии %D, то это воспринимается как сигнал покупки, если линии находятся под уровнем 80.
Select this check box to process the vendor invoice through a workflow approval process when the invoice is submitted for approval.
Установите этот флажок для обработки накладной поставщика с помощью процесса утверждения workflow-процесса, когда накладная направляется на утверждение.
These letters, in the main, are from my mother.
Эти письма в основном от моей матери.
This is the only signal to buy that can be generated when the bar chart values are below the nought line.
Это единственный сигнал на покупку, который может образоваться, когда значения гистограммы лежат ниже нулевой линии.
Catalog upload failed – An error occurred after the file was submitted for processing, and the CMR file was not imported.
Сбой отправки каталога — после отправки файла на обработку произошла ошибка, и файл CMR не был импортирован.
More than 90 percent of a web page visits are from search engines.
Более 90 процентов посещений веб-страниц делаются поисковыми системами.
The possible values are «true» or «false».
Принимаемые значения «true» или «false».
After an original project budget or budget revision is submitted for approval, you can use the Workflow history form to view details about the status and history of the budget workflow.
После того, как исходный бюджет проекта или версия бюджета отправляется для утверждения, можно использовать форму Журнал документооборотов для просмотра сведений о статусе и историю workflow-процесса бюджета.
You are from Columbia.
Ты из Колумбии.
One means that these values are equal;
Единица означает, что сумма прибыли равна сумме убытков;
The target install path submitted for the /CMSDataPath parameter is a non-NTFS volume.
Конечный путь установки, указанный в параметре /CMSDataPath, не является томом NTFS.
FOREX.com’s normal trading hours are from 5:00 pm Sunday through 5:00 pm on Friday, New York time.
Наш торговый центр обычно работает круглосуточно с 5:00 вечера по Нью-Йорку воскресенья до 5 часов вечера по Нью-Йорку пятницы.
Примеры употребления слов в разных контекстах собраны автоматически из открытых источников с помощью технологии поиска на основе двуязычных данных. В случае обнаружения неточностей или замечаний к тексту, используйте опцию «Сообщить о проблеме» или напишите нам
В этом разделе вы можете посмотреть, как употребляются слова и выражения в разных контекстах на реальных примерах.
Все примеры собраны из уже переведенных текстов: официальных документов, сайтов, журналов и диалогов из фильмов.
Раздел Контексты поможет в изучении английского, немецкого, испанского, русского и других языков. Здесь вы сможете найти примеры
с фразовыми глаголами, устойчивыми выражениями и многозначными словами в разнообразных по стилю и тематикам текстах
Примеры можно отсортировать по переводам и тематикам, а также сделать уточняющий поиск по найденным примерам.
Изучайте иностранные языки, смотрите перевод миллионов слов и выражений, проверяйте их употребление на реальных примерах благодаря нашей технологии поиска на основе двуязычных данных!
Вопрос:
Я получаю следующую ошибку:
if len(new_send_times) > rate_limit * window * self._throttle:
TypeError: can't multiply sequence by non-int of type 'float'
Это код:
if len(new_send_times) > rate_limit * window * self._throttle:
# Sleep the remainder of the window period.
delta = now - new_send_times[0]
total_seconds = (delta.microseconds + (delta.seconds +
delta.days * 24 * 3600) * 10 ** 6) / 10 ** 6
delay = window - total_seconds
if delay > 0:
sleep(delay)
recent_send_times.append(now)
# end of throttling
используемые им значения
if len([]) > 1.0 * 2.0 * 0.5:
Обновление: я изменил его ниже, и он работает, но я все еще не понимаю ошибку или хочу, чтобы я делал это правильно:
if len(new_send_times) > float(rate_limit) * float(window) * float(self._throttle):
Лучший ответ:
Ошибка довольно самоисследовательная. Вы выполняете операцию в форме
list * float # or other sequence * float
который запрещен в python, вы можете
numeric * float # "traditional" multiplication
или
list * int # creates concatenated copies of the list provided
Поэтому исследуйте свой код, проверяйте, какой объект является списком, и преобразуйте его в число, поскольку логика кода предполагает, что это ваше намеренное поведение.
Примеры:
[1] * 3 = [1,1,1]
[1] * 1.5 # ERROR
1 * 1.5 == 1.5
float([1]) * 1.5 == 1.5
"1" * 1.5 # ERROR
float("1") * 1.5 == 1.5
Ответ №1
Сообщение об ошибке
TypeError: can't multiply sequence by non-int of type 'float'
говорит, что хотя бы один из
len(new_send_times), rate_limit, window, self._throttle
это не число, как вы подозреваете, но какая-то последовательность.
Тот факт, что вы print эти значения и видите, что вы ожидаете, а также тот факт, что использование float() для значений делает работу кода, настоятельно предлагает, чтобы одно из них представляло собой строковое представление числа (например, '1.0') чем само число – str в Python считается sequence.
len() всегда будет возвращать int (или поднять ошибку!), поэтому нет необходимости беспокоиться об этом, но одна из трех других, вероятно, является строкой. Вам нужно [raw_]input значения ([raw_]input? Parsed file?) И убедиться, что они преобразуются в числовые типы в соответствующей точке (чем раньше, тем лучше, так как в других контекстах вы можете получить более тонкие проблемы).
Чтобы сказать разницу, при print значений для проверки вы можете сделать, например,
print(rate_limit, type(rate_limit))
Excel for Microsoft 365 Excel for the web Excel 2021 Excel 2019 Excel 2016 Excel 2013 More…Less
Note: If you need to find the percentage of a total or find the percentage of change between two numbers, you can learn more in the article Calculate percentages.
Change an amount by a percentage
Let’s say you need to decrease—or want to increase—your weekly food expenditures by 25%. To calculate the amount, use a formula to subtract or add a percentage.
In this example, we set column B to contain the amount currently spent, and column C is the percentage by which to reduce that amount. Here’s is a formula you could enter in cell D2 to accomplish this:
=B2*(1-C2)
In this formula, 1 is equivalent to 100%. The values inside the parentheses calculate first, so ther value of C2 is subtracted from 1, to give us 75%. The result is multiplied by B2 to get a result of 56.25 for Week 1.

To copy the formula in cell D2 down the column, double-click the small square green box in the lower-right corner of cell D2. You get the results in all of the other cells without retyping or copying-and-pasting the formula.
To increase the amount by 25%, simply replace the + sign in the formula in cell D2 sign to a minus (—):
=B2*(1+C2)
Then double-click the fill-down handle again.
Multiply an entire column of numbers by a percentage
Consider an example table like the one in the figure, in which we’ve got a few numbers to multiply by 15 percent. Even if the column has 100 or 1,000 cells of data, Excel can still handle it in a few steps.
Here’s how to do it:
-
Enter the numbers you want to multiply by 15% into a column.
-
In an empty cell, enter the percentage of 15% (or 0.15), and then copy that number by pressing Ctrl-C.
-
Select the range of cells A1:A5 (by dragging down the column).
-
Right-click over the cell selection, and then click Paste Special (do not click the arrow next to Paste Special).
-
Click Values > Multiply, then click OK.
The result is that all the numbers are multiplied by 15%.

Tip: You can also multiply the column to subtract a percentage. To subtract 15%, add a negative sign in front of the percentage, and subtract the percentage from 1, using the formula =1-n%, in which n is the percentage. To subtract 15%, use =1-15% as the formula.
Multiply an entire column of numbers by a percentage
In this example, we’ve got just a few numbers to multiply by 15 percent. Even if the column has 100 or 1000 cells of data, Excel for the web can still handle it in a few steps. Here’s how:
-
Type =A2*$C$2 in cell B2. (Be sure to include the $ symbol before C and before 2 in the formula.)
The $ symbol makes the reference to C2 absolute, which means that when you copy the formula to another cell, the reference will always be to cell C2. If you didn’t use $ symbols in the formula and you dragged the formula down to cell B3, Excel for the web would change the formula to =A3*C3, which wouldn’t work, because there is no value in C3.
-
Drag the formula in B2 down to the other cells in column B.
Tip: You can also multiply the column to subtract a percentage. To subtract 15%, add a negative sign in front of the percentage, and subtract the percentage from 1, using the formula =1-n%, where n is the percentage. So to subtract 15% use =1-15% as the formula.
Need more help?
Improve Article
Save Article
Improve Article
Save Article
Given a integer N, the task is to multiply the number with 15 without using multiplication * and division / operators.
Examples:
Input: N = 10
Output: 150Input: N = 7
Output: 105
Method 1: We can multiply integer N by 15 using bitwise operators. First left shift the number by 4 bits which is equal to (16 * N) then subtract the original number N from the shifted number i.e. ((16 * N) – N) which is equal to 15 * N.
Below is the implementation of the above approach:
C++
#include <bits/stdc++.h>
using namespace std;
long multiplyByFifteen(long n)
{
long prod = (n << 4);
prod = prod - n;
return prod;
}
int main()
{
long n = 7;
cout << multiplyByFifteen(n);
return 0;
}
Java
class GFG {
static long multiplyByFifteen(long n)
{
long prod = (n << 4);
prod = prod - n;
return prod;
}
public static void main(String[] args)
{
long n = 7;
System.out.print(multiplyByFifteen(n));
}
}
Python3
def multiplyByFifteen(n):
prod = (n << 4)
prod = prod - n
return prod
n = 7
print(multiplyByFifteen(n))
C#
using System;
class GFG {
static long multiplyByFifteen(long n)
{
long prod = (n << 4);
prod = prod - n;
return prod;
}
public static void Main()
{
long n = 7;
Console.Write(multiplyByFifteen(n));
}
}
PHP
<?php
function multiplyByFifteen($n)
{
$prod = ($n << 4);
$prod = $prod - $n;
return $prod;
}
$n = 7;
echo multiplyByFifteen($n);
?>
Javascript
<script>
function multiplyByFifteen(n)
{
let prod = (n << 4);
prod = prod - n;
return prod;
}
let n = 7;
document.write(multiplyByFifteen(n));
</script>
Time Complexity: O(1)
Auxiliary Space: O(1)
Method 2: We can also calculate the multiplication (15 * N) as sum of (8 * N) + (4 * N) + (2 * N) + N which can be obtained by performing left shift operations as (8 * N) = (N << 3), (4 * N) = (n << 2) and (2 * N) = (n << 1).
Below is the implementation of the above approach:
C++
#include <bits/stdc++.h>
using namespace std;
long multiplyByFifteen(long n)
{
long prod = (n << 3);
prod += (n << 2);
prod += (n << 1);
prod += n;
return prod;
}
int main()
{
long n = 7;
cout << multiplyByFifteen(n);
return 0;
}
Java
class GFG {
static long multiplyByFifteen(long n)
{
long prod = (n << 3);
prod += (n << 2);
prod += (n << 1);
prod += n;
return prod;
}
public static void main(String[] args)
{
long n = 7;
System.out.print(multiplyByFifteen(n));
}
}
Python3
def multiplyByFifteen(n):
prod = (n << 3)
prod += (n << 2)
prod += (n << 1)
prod += n
return prod
n = 7
print(multiplyByFifteen(n))
C#
using System;
class GFG {
static long multiplyByFifteen(long n)
{
long prod = (n << 3);
prod += (n << 2);
prod += (n << 1);
prod += n;
return prod;
}
public static void Main()
{
long n = 7;
Console.Write(multiplyByFifteen(n));
}
}
Javascript
<script>
function multiplyByFifteen(n)
{
var prod = (n << 3);
prod += (n << 2);
prod += (n << 1);
prod += n;
return prod;
}
var n = 7;
document.write(multiplyByFifteen(n));
</script>
Time Complexity: O(1)
Auxiliary Space: O(1)
>>>
Enter muzzle velocity (m/2): 60
Enter angle (degrees): 45
Traceback (most recent call last):
File "F:/Python31/Lib/idlelib/test", line 9, in <module>
range()
File "F:/Python31/Lib/idlelib/test", line 7, in range
Distance = float(decimal((2*(x*x))((decimal(math.zsin(y)))*(decimal(math.acos(y)))))/2)
TypeError: can't multiply sequence by non-int of type 'str'
Я только новичок, так что не будьте слишком резкими, если это действительно очевидно, но почему я получаю эту ошибку?
3 ответа
Лучший ответ
Вы должны преобразовать данные, которые вы получаете от консоли, в целые числа:
x = int(x)
y = int(y)
Distance = float(decimal((2*(x*x))((decimal(math.zsin(y)))*(decimal(math.acos(y)))))/2)
6
Sad Developer
30 Июл 2009 в 06:33
>>> '60' * '60'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't multiply sequence by non-int of type 'str'
Вы пытаетесь умножить две строки вместе. Вы должны преобразовать введенную пользователем строку в число, используя int() или float().
Кроме того, я не уверен, что вы делаете с decimal; похоже, что вы пытаетесь вызвать модуль (тип в модуле, decimal.Decimal), но нет особого смысла конвертировать десятичное число после делать математические вычисления с плавающей точкой и затем затем преобразовывать обратно в float.
В будущем опубликуйте код, который вызывает проблему (и сохраните взаимодействие и отслеживание). Но сначала попытайтесь сжать код как можно больше, убедившись, что он по-прежнему вызывает ошибку. Это важный шаг в отладке.
6
Miles
30 Июл 2009 в 06:25
Вы используете raw_input () для получения ввода. Вместо этого используйте input (). Он вернет Int. Убедитесь, что вы вводите только цифры или input () вызовет ошибку (скажем, в случае строки). Также было бы хорошо, если бы вы правильно назвали свои переменные. х и у мало что передают. (скорость и угол были бы намного лучше)
0
Goutham
30 Июл 2009 в 07:21