CodeSolved

Solved Programming Questions & Exercises

Check -up segmentation over 5

Practice Easy 4/ Download 5171 Views Most popular

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

46 Answers

number = int(input("عدد را وارد کنید: "))
if number % 5 == 0:
    print("عدد بر 5 بخش پذیر است.")
else:
    print("عدد بر 5 بخش پذیر نیست.")
Ai Download Python New
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
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

This answer is only visible to premium members

Subscription is currently unavailable.
# .اینجا عدد کاربر وارد میشود
number = float(input('enter number: '))
# .و در این قسمت از کد برسی میشود که بر 5 بخش پذیر است یا خیر
if number % 5.0 == 0:# .اگر عدد کاربر بخپذیر بود بخش پذیر بود را پیرینت میکند
    print('It is divisible.')
else: # .و اگر نبود بخش پذیر نبود را پرینیت میکند
    print('It was not divisible.')
Amirsaleh Download Python
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 ])
J1625 Download Python
# 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")
Roghaye.m Download Python
# 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')
<< Previous page 1 2 5 Next page >>

Submit answer

Submitting answers is currently unavailable.

×
×
Close