This program is not running.what should I do now? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12

This program is not running.what should I do now?

print('1. \n2. \n3. \n4. \n5. \n6. \n7. \n8. \n9.')

6th Feb 2021, 2:56 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
77 Answers
+ 14
Sathe Prerana Satish just remove space between them
6th Feb 2021, 3:03 AM
ÃKR
ÃKR - avatar
6th Feb 2021, 2:59 AM
Arsenic
Arsenic - avatar
+ 7
This is another way. for i in range(9): print(str(i+1)+'.')
7th Feb 2021, 1:07 PM
Sonic
Sonic - avatar
+ 5
It won't show any error because only the space is missing.
7th Feb 2021, 11:43 AM
S.Raghunath
S.Raghunath - avatar
+ 5
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 ........ I think this is ur required output, right?
7th Feb 2021, 2:48 PM
S.Raghunath
S.Raghunath - avatar
+ 5
using System; namespace PascalTriangleDemo { class Example { public static void Main() { int rows = 5, val = 1, blank, i, j; Console.WriteLine("Pascal's triangle"); for(i = 0; i<rows; i++) { for(blank = 1; blank <= rows-i; blank++) Console.Write(" "); for(j = 0; j <= i; j++) { if (j == 0||i == 0) val = 1; else val = val*(i-j+1)/j; Console.Write(val + " "); } Console.WriteLine(); } } } }
7th Feb 2021, 3:55 PM
S.Raghunath
S.Raghunath - avatar
+ 4
Which Language ?
6th Feb 2021, 2:57 AM
Arsenic
Arsenic - avatar
6th Feb 2021, 2:58 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 4
Thanks Arensic🙏
6th Feb 2021, 3:04 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 4
For your help 🙏
6th Feb 2021, 3:05 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 4
It only didn't work first time because the extra spaces caused the automated test to fail. Otherwise it was correct.
6th Feb 2021, 11:21 PM
Sonic
Sonic - avatar
+ 4
I think saying Hi should be done in DM or personal feed 😁.
7th Feb 2021, 8:25 AM
Sonic
Sonic - avatar
+ 4
Mam how is it possible from morning onwards I was suggesting u the same and it didn't work all of a sudden it now worked for u. I really wonder.
7th Feb 2021, 11:39 AM
S.Raghunath
S.Raghunath - avatar
+ 4
Wai a min I will post my screenshot.
7th Feb 2021, 11:46 AM
S.Raghunath
S.Raghunath - avatar
7th Feb 2021, 11:53 AM
S.Raghunath
S.Raghunath - avatar
+ 4
U can see the test case is passed with required output.
7th Feb 2021, 11:57 AM
S.Raghunath
S.Raghunath - avatar
7th Feb 2021, 12:16 PM
S.Raghunath
S.Raghunath - avatar
+ 4
Print ("""1. 2. 3. 4. 5. 6. 7. 8. 9."""")
7th Feb 2021, 1:08 PM
Saurabh Kumar Mishra
Saurabh Kumar Mishra - avatar
+ 4
You are most welcome. By the way keep coding. Never ever quit programming.
7th Feb 2021, 1:16 PM
S.Raghunath
S.Raghunath - avatar
+ 3
I also create just like this code but it is not running.
6th Feb 2021, 3:00 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar