using System;
namespace restless
{
class Program
{
static void Main(string[] args)
{
int N;
bool _isBin = true;
N = Convert.ToInt32(Console.ReadLine());
N = Math.Abs(N);
while (N > 0)
{
if (N % 10 != 0 && N % 10 != 1)
{
_isBin = false;
break;
}
N /= 10;
}
Console.WriteLine(_isBin);
}
}
}
what = input("Что делать (+, -, *, :) : ")
b = float(input("Первое число ") )
c = float(input("Второе число "))
if what == "+" :
a = b + c
print("Результат " + str(a))
elif what == "-" :
a = b - c
print("Результат " + str(a))
elif what == "*" :
a = b * c
print("Результат " + str(a))
elif what == ":" :
a = b / c
print("Результат " + str(a))
else:
print("Eror, try again")
Объяснение: