Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions modulus .py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python
# coding: utf-8

# In[10]:


while True:# If the while condition is true if block is executed
a=input("Do you want to continue or not(y/n)?")
if a.upper()=='Y':# if the user pass 'Y' the following statement is executed
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove input logic

break
a=int(input('FIRst number is:')) #first number
b=int(input('second number is:')) #second number
print(a,"%",b,"=",a%b)# perform a % b
print(b,"%",a,"=",b%a) # perform b % a


# In[ ]: