Python Forum
help with commas in print functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with commas in print functions
#6
The full code is
First_number = float(input("Enter first number "))
Second_number = float(input("Enter second number "))
Third_number = float(input("Enter third number "))

Total = First_number + Second_number + Third_number
Average = Total / 3

User_inputs = First_number , Second_number , Third_number

print("The total is ",Total)
print("The average is ",Average)
print(f"The input numbers are", User_inputs)
with and output of
Output:
Enter first number 7 Enter second number 8 Enter third number 9 The total is 24.0 The average is 8.0 The input numbers are (7.0, 8.0, 9.0)
Reply


Messages In This Thread
RE: help with commas in print functions - by Yoriz - Oct-12-2021, 08:46 AM
RE: help with commas in print functions - by kronhamilton - Oct-12-2021, 11:43 AM
RE: help with commas in print functions - by buran - Oct-12-2021, 11:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Commas issue in variable ddahlman 6 622 Apr-05-2024, 03:45 PM
Last Post: deanhystad
  Print different positions in loop from functions konsular 5 2,830 Oct-16-2019, 08:10 PM
Last Post: buran
  Help|CSV Writing on List with Inner Commas soothsayerpg 2 2,449 Jul-20-2019, 06:59 AM
Last Post: scidam
  [split] Automate the boring stuff, inserting commas in list srikanth 1 2,172 Jul-02-2019, 02:29 PM
Last Post: metulburr
  Automate the boring stuff, inserting commas in list DJ_Qu 3 4,846 Apr-21-2019, 03:52 PM
Last Post: perfringo
  accessing array without commas rjnabil1994 1 2,598 Feb-10-2019, 06:29 PM
Last Post: Larz60+
  Printing array without commas pawlaczkaj 1 9,594 Apr-08-2018, 07:05 PM
Last Post: Larz60+
  How to remove empty line between two print functions BigEasy 1 2,427 Feb-07-2018, 08:38 AM
Last Post: buran

Forum Jump:

User Panel Messages

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