Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculator math.sqrt
#2
Well, you need to add a new choice, with a new print after line 24 and a change to the text in line 26. Then you need a ways to distinguish binary operators from unary operators, and only has for a second number if the operator is binary. I would make a list of the choices for binary operators, and add an if statement to check that before line 28. Then you need a new elif for the new choice, right after line 36. That should do it.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Calculator math.sqrt - by GFreenD - Oct-28-2019, 12:58 PM
RE: Calculator math.sqrt - by ichabod801 - Oct-28-2019, 01:13 PM
RE: Calculator math.sqrt - by GFreenD - Oct-28-2019, 02:08 PM
RE: Calculator math.sqrt - by ichabod801 - Oct-28-2019, 02:20 PM
RE: Calculator math.sqrt - by jefsummers - Oct-28-2019, 08:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Adding a sqrt function syntax error and <build-in function sqrt> from tkinter import Kael 0 1,899 Oct-14-2019, 05:51 PM
Last Post: Kael

Forum Jump:

User Panel Messages

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