Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e0f6269

Browse files
Add files via upload
1 parent 3e1c9c7 commit e0f6269

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

‎Python:_Division.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Task
2+
# Read two integers and print two lines. The first line should contain integer division, a//b . The second line should contain float division, a/b
3+
# .
4+
# You don't need to perform any rounding or formatting operations.
5+
6+
if __name__ == '__main__':
7+
a = int(input())
8+
b = int(input())
9+
print(a//b)
10+
print(a/b)
11+

‎Validating_Roman_Numerals.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# You are given a string, and you have to validate whether it's a valid Roman numeral. If it is valid, print True. Otherwise, print False. Try to create a regular expression for a valid Roman numeral.
2+
3+
# Input Format
4+
5+
# A single line of input containing a string of Roman characters.
6+
7+
# Output Format
8+
9+
# Output a single line containing True or False according to the instructions above.
10+
11+
# Constraints
12+
13+
# The number will be between
14+
# and
15+
16+
# (both included).
17+
18+
# Sample Input
19+
20+
# CDXXI
21+
22+
# Sample Output
23+
24+
# True
25+
26+
27+
regex_pattern = r"^M{0,3}(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[VX]|V?I{0,3})$"
28+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /