Python 3.7 n after a loop [closed]Finding the minimum number of required deletions to have a non-repeating...

How should I respond when I lied about my education and the company finds out through background check?

How to implement a feedback to keep the DC gain at zero for this conceptual passive filter?

Does Doodling or Improvising on the Piano Have Any Benefits?

How does a computer interpret real numbers?

Is there a RAID 0 Equivalent for RAM?

Is it better practice to read straight from sheet music rather than memorize it?

Fear of getting stuck on one programming language / technology that is not used in my country

What should you do if you miss a job interview (deliberately)?

If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?

Is (0,1] a closed or open set?

Biological Blimps: Propulsion

Redundant comparison & "if" before assignment

Added a new user on Ubuntu, set password not working?

Why does the Sun have different day lengths, but not the gas giants?

Rising and falling intonation

Count the occurrence of each unique word in the file

copy and scale one figure (wheel)

Loading commands from file

Terse Method to Swap Lowest for Highest?

Is aluminum electrical wire used on aircraft?

Did arcade monitors have same pixel aspect ratio as TV sets?

How could a planet have erratic days?

How to explain what's wrong with this application of the chain rule?

Infinite dials to reset ever?



Python 3.7 n after a loop [closed]


Finding the minimum number of required deletions to have a non-repeating stringMethod injection into TestClass local namespace for automatic generation of Python unittest “test_xxx” methodsPython IBAN validationImproved version of “Let's read a random Goodreads book…”Simple Addition and Subtraction Game in PythonA program that prints the longest substring of s in which the letters occur in alphabetical orderSearch father (x) of the number D(x) and measure time and memory consumedReconstruct a string, given a list of subsequence tripletsPassword generator in Python 3.7Python 3.7 UltimateBruteforcer













-3












$begingroup$


Hey I wrote the following code for an assigment:



def triangular_area():
for i in range(0, 10):
print(((i+1)**2)/2, end=" ")


and it prints the following:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0


however, If I call another function that prints a random string right after I call triangular_area, it prints the string in the same line like that:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0 "random str"


how can I insert a single n that will occur in the end of for statment?



the machine should read: 0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0n



thanks










share|improve this question









$endgroup$



closed as off-topic by πάντα ῥεῖ, Ludisposed, Vogel612 Mar 15 at 20:28


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, Ludisposed, Vogel612

If this question can be reworded to fit the rules in the help center, please edit the question.
















  • $begingroup$
    Welcome to Code Review! I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing what your code does. Once the code does what you want, we would love to help you do the same thing in a cleaner way! Please see our help center for more information.
    $endgroup$
    – Vogel612
    Mar 15 at 20:28
















-3












$begingroup$


Hey I wrote the following code for an assigment:



def triangular_area():
for i in range(0, 10):
print(((i+1)**2)/2, end=" ")


and it prints the following:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0


however, If I call another function that prints a random string right after I call triangular_area, it prints the string in the same line like that:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0 "random str"


how can I insert a single n that will occur in the end of for statment?



the machine should read: 0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0n



thanks










share|improve this question









$endgroup$



closed as off-topic by πάντα ῥεῖ, Ludisposed, Vogel612 Mar 15 at 20:28


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, Ludisposed, Vogel612

If this question can be reworded to fit the rules in the help center, please edit the question.
















  • $begingroup$
    Welcome to Code Review! I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing what your code does. Once the code does what you want, we would love to help you do the same thing in a cleaner way! Please see our help center for more information.
    $endgroup$
    – Vogel612
    Mar 15 at 20:28














-3












-3








-3





$begingroup$


Hey I wrote the following code for an assigment:



def triangular_area():
for i in range(0, 10):
print(((i+1)**2)/2, end=" ")


and it prints the following:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0


however, If I call another function that prints a random string right after I call triangular_area, it prints the string in the same line like that:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0 "random str"


how can I insert a single n that will occur in the end of for statment?



the machine should read: 0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0n



thanks










share|improve this question









$endgroup$




Hey I wrote the following code for an assigment:



def triangular_area():
for i in range(0, 10):
print(((i+1)**2)/2, end=" ")


and it prints the following:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0


however, If I call another function that prints a random string right after I call triangular_area, it prints the string in the same line like that:



0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0 "random str"


how can I insert a single n that will occur in the end of for statment?



the machine should read: 0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0n



thanks







python-3.x






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 15 at 19:49









trizztrizz

1




1




closed as off-topic by πάντα ῥεῖ, Ludisposed, Vogel612 Mar 15 at 20:28


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, Ludisposed, Vogel612

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by πάντα ῥεῖ, Ludisposed, Vogel612 Mar 15 at 20:28


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – πάντα ῥεῖ, Ludisposed, Vogel612

If this question can be reworded to fit the rules in the help center, please edit the question.












  • $begingroup$
    Welcome to Code Review! I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing what your code does. Once the code does what you want, we would love to help you do the same thing in a cleaner way! Please see our help center for more information.
    $endgroup$
    – Vogel612
    Mar 15 at 20:28


















  • $begingroup$
    Welcome to Code Review! I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing what your code does. Once the code does what you want, we would love to help you do the same thing in a cleaner way! Please see our help center for more information.
    $endgroup$
    – Vogel612
    Mar 15 at 20:28
















$begingroup$
Welcome to Code Review! I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing what your code does. Once the code does what you want, we would love to help you do the same thing in a cleaner way! Please see our help center for more information.
$endgroup$
– Vogel612
Mar 15 at 20:28




$begingroup$
Welcome to Code Review! I'm afraid this question does not match what this site is about. Code Review is about improving existing, working code. Code Review is not the site to ask for help in fixing or changing what your code does. Once the code does what you want, we would love to help you do the same thing in a cleaner way! Please see our help center for more information.
$endgroup$
– Vogel612
Mar 15 at 20:28










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...