Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions Python/Saikiran-MultiplicationTable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def table (n: int):
for i in range (1,11):
print (n,"x",i,"=",(n*i))

def main():
number = int(input("Enter a no. between 1 to 10: "))
Copy link
Owner

@karastoyanov karastoyanov Apr 5, 2023

Choose a reason for hiding this comment

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

  • Try to implement a IF-statement in case that the user accidently enters a different type instead of integer.
  • What will hapen if the user input is bigger than 10 or less than 0? Try to solve this case

table(number)

main()
9 changes: 9 additions & 0 deletions Python/multiplication_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def table (n: int):
for i in range (1,11):
print (n,"x",i,"=",(n*i))

def main():
number = int(input("Enter a no. between 1 to 10: "))
table(number)

main()