Python Forum
How to get number with print statement
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get number with print statement
#2
don't use print to display the prompt, but raw_input
number1 = int(raw_input("Promote user to enter first number"))
number2 = int(raw_input("Promote user to enter second number"))
addition = number1 + number2
print "addition : {}".format(addition)
That said, why do you use python2? As newbie, you should start with python3. python2 official support ends in less than 1.5 years
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
How to get number with print statement - by Rehan11 - Jul-28-2018, 02:00 PM
RE: How to get number with print statement - by buran - Jul-28-2018, 02:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print Player Name and Number of Pokemon webmanoffesto 1 1,131 Aug-23-2022, 08:54 PM
Last Post: deanhystad
  Why doesn't this print statement work? stylingpat 10 5,819 Mar-23-2021, 07:54 PM
Last Post: buran
  print two different sequence number mantonegro 2 1,692 Nov-16-2020, 06:19 PM
Last Post: mantonegro
  Runs perfect in Python but fails to print last statement when converted to .exe. Help sunil422 3 2,853 Aug-13-2020, 01:22 PM
Last Post: deanhystad
  Print the number of items in a list on ubuntu terminal buttercup 2 1,962 Jul-24-2020, 01:46 PM
Last Post: ndc85430
  Beginner Code, how to print something after a number of turns (guessing game) QTPi 4 2,804 Jun-18-2020, 04:59 PM
Last Post: QTPi
  Taking brackets out of list in print statement pythonprogrammer 3 2,431 Apr-13-2020, 12:25 PM
Last Post: perfringo
  capture print statement written in Stored Procedure in SQL Server brijeshkumar_77 0 2,583 Feb-18-2020, 03:22 AM
Last Post: brijeshkumar_77
  printing a list contents without brackets in a print statement paracelx 1 2,159 Feb-15-2020, 02:15 AM
Last Post: Larz60+
  Print 'X' a number of times Than999 1 2,673 Jan-18-2020, 06:41 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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