Find the coefficient of numbers
Write a program thatA one -digit numberGet from the input and find the coefficients smaller than 100 of those numbers and print in the output
Write a program thatA one -digit numberGet from the input and find the coefficients smaller than 100 of those numbers and print in the output
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
def find_multiple(): """ تابع با گرفتن ورودی مضاربش را پیدا میکند """ while True: try: user_input = int(input("enter the multiple :")) # Input as integers if user_input == 0: # If the input was zero the appropriate message will display print("The number should not be zero⛔") continue if len(str(user_input)) != 1: # Check that the number is one digit print("The number must be single-digit⛔") continue lst = [] for i in range(1, 101): # From 1 to 100 if i % user_input == 0: # Input number lst.append(i) print(f"Result: {lst}") # Output printing except ValueError: # If the input of the number is not print("Please enter an integer amount⛔") continue find_multiple()
num = int(input("یک عدد یک رقمی وارد کنید: "))
for i in range(1, 100):
if i % num == 0:
print(i)
lis = [] def numbers() : num1 = int(input("Enter your number : ")) if num1 >= 0 and num1 <= 9 : for x in range(1, 101) : if num1 % x == 0 : lis.append(x) return lis else : print("lotfan adade tak reghami entekhab konid.") numbers() numbers() print(lis)
lis = [] def numbers() : num1 = int(input("Enter your number : ")) if num1 >= 0 and num1 <= 9 : for x in range(1, 101) : if num1 % x == 0 : lis.append(x) return lis else : print("lotfan adade tak reghami entekhab konid.") numbers() numbers() print(lis)
a= int(input("number:")) If 0<a<10 : For i in range(1, 100+1): X=i*a If x>100: Break Else: Print(x) Else: Print(" فقط اعداد تکرقمی ")
def find_multiples(number): multiples = [] for i in range(1, 100 // number + 1): multiples.append(number * i) return multiples # Get a one -digit number from the user user_input = input("لطفاً یک عدد یک رقمی وارد کنید: ") # Converting input to integers try: number = int(user_input) if 0 <= number < 10: # Check that the number is one digit # Find the melods multiples = find_multiples(number) # Display the result print(f"مضربهای {number} که کمتر از 100 هستند: {multiples}") else: print("لطفاً یک عدد یک رقمی (بین 0 تا 9) وارد کنید.") except ValueError: print("لطفاً یک عدد صحیح وارد کنید.")
num=1
data=int(input("enter the number between 1 to 9"))
products=[]
while 1:
result=data*num
if result>100:
break
products.append(result)
num+=1
print(products)
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.