Size: a a a

2021 April 09

AA

Aidosuly Askar in Python KZ
Ол сайттар қиын енді бастап жүрген программисттерге

Acmp.ru бастап көрген жақсы
источник

Х

Халил in Python KZ
C++ ?
источник

AA

Aidosuly Askar in Python KZ
барлық тілдер бар
источник

Х

Халил in Python KZ
Корейк
источник

Н

Нели in Python KZ
In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all the nonnegative integers from 1 to n. For example,
7!=1×2×3×4×5×6×7=5,040 and
4!=1×2×3×4=24
Write a program that asks the user to enter a positive number. If the user enters a negative the input validation loop should re-prompt the user for a positive number. Then the program uses another loop to calculate the factorial of that number. Note that 0! and 1! are 1. Display the factorial. Your program should continue to re-prompt the user for another number and display the factorial until the user enters a sentinel.
источник

Н

Нели in Python KZ
привет, вот такое есть задание. я правильно сделала?
источник

Н

Нели in Python KZ
def main7():
   n=int(input("enter nonnegative integer:"))
   factorial=1
#If the user enters a negative the input validation loop
   #should re-prompt the user for a positive number
   
   while n<0:
       print("error:not nonnegative int:")
       n=int(input("enter nonnegative integer:"))
#calculate the factorial of that number
       
   for number in range(n):
       
       factorial=factorial*n
       

#n=n-1 error will not have the correct n for when you print
       print(n,"!",factorial)
#Display the factorial
   
     
main7()
источник

Н

Нели in Python KZ
мне кажется здесь пара ошибок в коде
источник

Н

Нели in Python KZ
enter nonnegative integer:4
3 ! 3
2 ! 6
1 ! 6
0 ! 0
источник

Н

Нели in Python KZ
вот такой аутпут у меня получился
источник

IM

Ilyar Makhsum in Python KZ
Output не правильный
источник

Н

Нели in Python KZ
enter nonnegative integer:4
4 ! 1
4 ! 2
4 ! 6
4 ! 24
источник

Н

Нели in Python KZ
а этот правильный?
источник

IM

Ilyar Makhsum in Python KZ
А стоп так там не число потом его факториал?
источник

Н

Нели in Python KZ
4!=1×2×3×4=24 такой доожен быть?
источник

Н

Нели in Python KZ
я сама не знаю
источник

IM

Ilyar Makhsum in Python KZ
Да
источник

Н

Нели in Python KZ
а в какой линии в коде ошибка?
источник

Н

Нели in Python KZ
источник

Н

Нели in Python KZ
вот еще так изменила код
источник