Python Forum
output correction using print() function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
output correction using print() function
#1
HI everyone , can you help me to solve this task please specially the first question for others

print(" *")
print(" * *")
print(" * *")
print(" * *")
print("*** ***")
print(" * *")
print(" * *")
print(" *****")

Try to:

minimize the number of print() function invocations by inserting the \n sequence into the strings
make the arrow twice as large (but keep the proportions)

duplicate the arrow, placing both arrows side by side; note: a string may be multiplied by using the following trick: "string" * 2 will produce "stringstring" (we'll tell you more about it soon)

remove any of the quotes, and look carefully at Python's response; pay attention to where Python sees an error - is this the place where the error really exists?

do the same with some of the parentheses;

change any of the print words into something else, differing only in case (e.g., Print) - what happens now?
replace some of the quotes with apostrophes; watch what happens carefully.
Reply


Messages In This Thread
output correction using print() function - by afefDXCTN - Aug-10-2020, 09:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  print doesnt work in a function ony 2 290 Mar-11-2024, 12:42 PM
Last Post: Pedroski55
  problem in output of a function akbarza 9 1,178 Sep-29-2023, 11:13 AM
Last Post: snippsat
  Python VS Code: using print command twice but not getting output from terminal kdx264 4 1,075 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  How to print variables in function? samuelbachorik 3 901 Dec-31-2022, 11:12 PM
Last Post: stevendaprano
  How to output one value per request of the CSV and print it in another func? Student44 3 1,322 Nov-11-2022, 10:45 PM
Last Post: snippsat
  How to print the output of a defined function bshoushtarian 4 1,278 Sep-08-2022, 01:44 PM
Last Post: deanhystad
Sad Want to Save Print output in csv file Rasedul 5 10,903 Jan-11-2022, 07:04 PM
Last Post: snippsat
  Why does absence of print command outputs quotes in function? Mark17 2 1,376 Jan-04-2022, 07:08 PM
Last Post: ndc85430
  return vs. print in nested function example Mark17 4 1,736 Jan-04-2022, 06:02 PM
Last Post: jefsummers
Photo print output none 3lnyn0 4 1,820 Nov-01-2021, 08:46 PM
Last Post: 3lnyn0

Forum Jump:

User Panel Messages

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