Check -up segmentation over 5
Write a program that receives a number from the input and checks whether the number is segmented to 5.
Tips: The numeric is on 5 segments that remain the remaining 5 zero
Write a program that receives a number from the input and checks whether the number is segmented to 5.
Tips: The numeric is on 5 segments that remain the remaining 5 zero
number = int(input("عدد را وارد کنید: "))
if number % 5 == 0:
print("عدد بر 5 بخش پذیر است.")
else:
print("عدد بر 5 بخش پذیر نیست.")
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
# .اینجا عدد کاربر وارد میشود
number = float(input('enter number: '))
# .و در این قسمت از کد برسی میشود که بر 5 بخش پذیر است یا خیر
if number % 5.0 == 0:# .اگر عدد کاربر بخپذیر بود بخش پذیر بود را پیرینت میکند
print('It is divisible.')
else: # .و اگر نبود بخش پذیر نبود را پرینیت میکند
print('It was not divisible.')
number = int (input ('Enter the number you want to know if it is divisible by 5: '))
if number % 5 == 0:
print (number, 'is divisible by 5.')
elif number % 5 != 0:
print (number, 'is not divisible by 5.')
a=int(input("a:")) print([a % 5 == 0 ])
# Check -up segmentation over 5
x=int(input("enter your number: "))
if x%5==0:
print("correct")
else:
print("incorrect")
a=int(input("enter number:")) if a%5==0: print("bakhsh pazir ast") elif a%5!=0: print("bakhsh pazir nist") else: print("add sefer ast")
# Get input from the user num = int(input('please enter number :')) # Output segmentability and output print if num % 5 == 0 : print('\n True') else : print('\n False')
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.