Python Forum
Arithmetic operations using lists
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Arithmetic operations using lists
#1
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
#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
#3
1. Don't double post on the forums.
2. What have you tried? Post your coding attempt in Python code tags and errors in error tags if they show up. You can find help here.
If there are no errors you can show the results you get vs. the desired result.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help implementing an input with file operations Gaijin 3 2,084 Jun-08-2022, 05:50 PM
Last Post: Gaijin
  Arithmetic and python pythonuser1 1 1,614 Apr-12-2020, 07:11 PM
Last Post: pythonuser1
  Arithmetic exercice with python pythonuser1 4 2,098 Apr-11-2020, 04:00 PM
Last Post: pythonuser1
  Order of operations for reassignment of a variable StillAnotherDave 1 1,695 Jan-21-2020, 12:20 PM
Last Post: buran
  Arithmetic Application design Emoji 1 1,819 Jul-23-2019, 11:16 AM
Last Post: jefsummers
  I'm a bit confused with these boolean operations on integers goelraghavg 6 3,651 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