Python Forum
Arithmetic operations using lists
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Arithmetic operations using lists
#2
Hello everyone,

I'm a beginner in python we are taking a python coding course in my school and we have been assigned a homework to do.
Please how can I make python differentiate between a valid arithmetic operation and an invalid one.
for example :
- Please enter an arithmetic operation: abc
Invalid arithmetic operation!

- Please enter an arithmetic operation: 83*121
Valid arithmetic operation!
Reply


Messages In This Thread
HELP arithmetic operations - by yassine - May-02-2018, 05:55 PM
RE: Arithmetic operations using lists - by j.crater - May-02-2018, 06:20 PM
Arithmetic operations using lists - by yassine - May-02-2018, 06:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help implementing an input with file operations Gaijin 3 2,137 Jun-08-2022, 05:50 PM
Last Post: Gaijin
  Arithmetic and python pythonuser1 1 1,686 Apr-12-2020, 07:11 PM
Last Post: pythonuser1
  Arithmetic exercice with python pythonuser1 4 2,160 Apr-11-2020, 04:00 PM
Last Post: pythonuser1
  Order of operations for reassignment of a variable StillAnotherDave 1 1,722 Jan-21-2020, 12:20 PM
Last Post: buran
  Arithmetic Application design Emoji 1 1,848 Jul-23-2019, 11:16 AM
Last Post: jefsummers
  I'm a bit confused with these boolean operations on integers goelraghavg 6 3,723 Aug-25-2018, 03:16 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020