Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8455993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:25:56+00:00 2026-06-10T12:25:56+00:00

I am a beginner python learner. I created this simple program but won’t display

  • 0

I am a beginner python learner. I created this simple program but won’t display any error message neither does it work. After the input it stops working. What am I doing wrong? [ Python 3.2]

import math

print('''

   |.
   |  .
  a|    . c
   |      .
   |________.
       b

''')

def robot():
    a = float(input('Enter side a, 0 for unknown \n: '))
    b = float(input('Enter side b, 0 for unknown \n: '))
    c = float(input('Enter hypotenuse c, 0 for unknown \n: '))

    if a == 0:
        print = ('a = ', (math.sqrt((c**2)-(b**2))))
    if b == 0:
        print = ('b = ', (math.sqrt((c**2)-(a**2))))
    if c == 0:
        print = ('a = ', (math.sqrt((a**2)+(b**2))))

    input()
    robot()


robot()

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:25:58+00:00Added an answer on June 10, 2026 at 12:25 pm
    print = ('b = ', (math.sqrt((c**2)-(a**2))))
          ^
    

    Delete the assignment operator after the print. print is a function, so to call it you only have to provide the arguments in the parenthesis, like this:

    print('b = ', (math.sqrt((c**2)-(a**2))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a beginner in Python and I have written this simple code but
Python beginner here, so I apologize if this question has a simple answer. (I
I'm almost an absolute beginner in Python, but I am asked to manage some
I am a Python beginner and my next project is a program in which
I'm a complete beginner in Python and programming in general. I made a program
Beginner in python, but been programming for about 5 years now. I suspect I
I am beginner in python and facing this problem. So how i can break
Python beginner here. I've looked around and found similar questions but can't quite cobble
I am a beginner to python and any coding at all for that matter,
I consider myself a very beginner at python(and programming in general!), but I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.