0

Can anyone help me in a pattern problem in python

https://code.sololearn.com/cbolOKCO6uP9/?ref=app PPLLZZZ HELP

17th Aug 2019, 3:03 PM
Rahul guha
Rahul guha - avatar
9 Answers
+ 1
Rahul guha I'm not going to write the code since I'm assuming this is for a graded assignment of some sort, but I will give you a hint: use while loops to print spaces until you reach the desired area to print the numbers at. For instance, for the output on line 6, you would print out spaces until you've printed out a specific number of them (say, 70ish for this specific line) and THEN you would print the number 1. Alternatively, you could just write a single print statement for this line that includes a bunch of /t's or spaces before the desired output. Whichever one you do is up to you as I'm not entirely sure of what the requirements are for this program. Good luck!
17th Aug 2019, 7:09 PM
Eli (I accept all challenges!)
Eli (I accept all challenges!) - avatar
+ 2
Oh boy... alright, where do I start. 1.) Replace the for loops with if statements 2.) Comment out "printing" with # as it is not executable code 3.) Remove the lines with random numbers on them (e.g., line 6 has a random 1 spanned halfway onto it); this will cause an error during compilation You don't seem to be printing anything or trying to accomplish a specific task so I'm lost as to how to help you with your code further. Just keep working on the python course and remembering that formatting is the most important thing is this language.
17th Aug 2019, 5:50 PM
Eli (I accept all challenges!)
Eli (I accept all challenges!) - avatar
+ 1
Rahul guha Ah sorry about that! I assumed that was your code haha. For all formatting required on the output, try importing PyFormat and using it to specify where you want everything printed at in a grid-like fashion. It'll take some research on different functions available in the PyFormat module and some playing around with them, but I'm confident you can write some starting code to get that accomplished. Visit https://pyformat.info/ for a list of the available functions within this module.
17th Aug 2019, 7:03 PM
Eli (I accept all challenges!)
Eli (I accept all challenges!) - avatar
+ 1
actually we are allowed only to use ifs and loops....😅
17th Aug 2019, 7:04 PM
Rahul guha
Rahul guha - avatar
0
😂😂...you got me wrong...this is not the code...but the output required.....i need somebody to code the program as i am not able to think of any solutions
17th Aug 2019, 6:58 PM
Rahul guha
Rahul guha - avatar
0
it would be very helpful if you write the actual code....
17th Aug 2019, 7:06 PM
Rahul guha
Rahul guha - avatar
18th Aug 2019, 3:34 AM
Rahul guha
Rahul guha - avatar
0
i wrote it spending the free time time of my night......but still it didnt produced the output...đŸ˜«đŸ˜«đŸ˜«
18th Aug 2019, 3:35 AM
Rahul guha
Rahul guha - avatar
0
please somebody help
18th Aug 2019, 3:35 AM
Rahul guha
Rahul guha - avatar