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

  • SEARCH
  • Home
  • 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 8516803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:31:58+00:00 2026-06-11T05:31:58+00:00

print(enter start() to start the program) def start(): print(This script converts GBP into any

  • 0
print("enter start() to start the program")

def start():
    print("This script converts GBP into any currency based on the exchange rate...")
    print(" ") #enters a line
    exchangeRate = int(input("Enter the exchange rate (Eg: 0.80)"))
    print("how much would you like to convert???")                       
    gpb = int(input())
    print(gpb*exchangeRate)

If I put the exchange-rate at 0.81 and I enter £1 it always returns 0.

  • 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-11T05:31:59+00:00Added an answer on June 11, 2026 at 5:31 am

    Use float() instead of int() with your input() call. I.e.,

        gpb = float(input())
    

    otherwise if the user enters 0.81, int() will truncate this to 0 during the conversion.

    By using float() you’ll keep the decimal value supplied as input and your computation should yield the result you expect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote the following script, which generates a SyntaxError : #!/usr/bin/python print Enter the
I have this code in Python inputted = input(Enter in something: ) print(Input is
I created this script and I want to print the outputs on one line,
require 'open-uri' print Enter a URL add = gets open(#{add}) do |f| j =
I check like this: enter code here var point = new g.LatLng(parseFloat(lat),parseFloat(lng)); var bounds
I just picked up IronPython and I've been trying to get this IronPython script
After i input 10 names ,I have to print all the names that start
I am learning python and am having trouble getting this program to work correctly.
I am trying to write a number guessing program as follows: def oracle(): n
I want to write a program which will print a string every second on

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.