Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,059 members, 7,814,646 topics. Date: Wednesday, 01 May 2024 at 04:55 PM |
Nairaland Forum / Science/Technology / Programming / Coding Looks Cool. (18673 Views)
CODELAGOS: 337 Schools To Participate In Coding Competition / Learn Coding For Free, With Microverse, Pay The Tuition When You Start Earning. / Do We Have Coding Bootcamps In Nigeria? / Faster Way To Learn Web Development. (2) (3) (4)
(1) (2) (3) (4) (5) (Reply) (Go Down)
Re: Coding Looks Cool. by Daejoyoung: 11:24am On Nov 25, 2019 |
peterincredible:python 2 would no longer be maintained from next year onwards. |
Re: Coding Looks Cool. by peterincredible: 2:44pm On Nov 25, 2019 |
Grandlord:no the course dont have projects oo just some few challenges after each section but u can just to look for projects on your own or mimic any small project wey u c for youtube and for the payment i didnt pay for it i just download thw whole course from freetutorials.us |
Re: Coding Looks Cool. by Bossgem: 11:26pm On Nov 26, 2019 |
Hi guys! Can you please help me figure out how to print this hollow rectangle with for loops? I was able to do it with print () alone. But the instruction is to use for loop. I tried youtube but didn't get any good answers. Please help!
|
Re: Coding Looks Cool. by Maskyy(m): 11:27am On Nov 27, 2019 |
Bossgem: With Python 3 def print_rectangle(n, m) : for i in range(1, n+1 ) : for j in range(1, m+1 ) : if (i == 1 or i == n or j == 1 or j == m ) : print( "*", end="" ) else : print( " ", end="" ) print() # Driver program for above function rows = 6 columns = 20 print_rectangle(rows, columns) |
Re: Coding Looks Cool. by Bossgem: 2:17pm On Nov 27, 2019 |
Maskyy: Thank you! A friend of mine helped me figure it out yesterday. Thanks again. |
Re: Coding Looks Cool. by Grandlord: 2:57pm On Nov 27, 2019 |
Bossgem:I didn't see this earlier. Number 10; for row in range(4): Number 11; for row in range(1, 5): Number 12; output = " " You can wrap it all up, in a function definition like that my bro did above, so the user can input whatever values they want to. I didn't want to do that because maybe you've not learnt functions yet? I'd like to see your friend's solutions so I could know if there's another way I could write shorter and cleaner solutions. We're all learning. Also, where did you get the exercises from please? |
Re: Coding Looks Cool. by Grandlord: 3:55pm On Nov 27, 2019 |
Maskyy:Nice one bro. I didn't learn about this end= keyword though. I guess I'll have to go read it up. |
Re: Coding Looks Cool. by iCode2: 4:56pm On Nov 27, 2019 |
Grandlord:Seems programmers na. Chai make I rush go read small. 1 Like |
Re: Coding Looks Cool. by Grandlord: 5:05pm On Nov 27, 2019 |
iCode2:My man! |
Re: Coding Looks Cool. by Kubernetes: 5:31pm On Nov 27, 2019 |
An advice to anyone learning. The easiest place to learn a Lang faster is to go to the language documentation site.You hear first hand information and explaination from the horses mouth (those you created the program).You get to know all the data types and it relates bits and bytes,syntax,data structures,control statements, functions,OOP concepts etc from them.They even show you how to build some basic apps in that language. e.g Java doc site Perl doc site Python doc site Infact after downloading the language,u will be directed to the learning documentation. Also it's worth it,if you learn the basics of 32bits and 64 bits processors in relation to a transistor.Things like binary way of representing data.Also dig out how computer memory works in bits and bytes. 3 Likes 1 Share |
Re: Coding Looks Cool. by Bossgem: 6:54pm On Nov 27, 2019 |
Grandlord: Ok. Thank you. I will go over your code. The thing is the chapter I'm reading is on for loop, so I'm expected to use only my knowledge of for loop to solve the exercises. I'm using a book, practical introduction to python. I have attached a screenshot of the book—that's what I'm using to study.
|
Re: Coding Looks Cool. by Bossgem: 6:57pm On Nov 27, 2019 |
Kubernetes: You're right about the documentation. One can actually download the entire documentation as a pdf file. I have the one for python for reference purposes 1 Like |
Re: Coding Looks Cool. by Grandlord: 9:26pm On Nov 27, 2019 |
Bossgem:Thanks. I've checked it out and there are lots of practice exercises on there to work on. |
Re: Coding Looks Cool. by Maskyy(m): 11:08pm On Nov 27, 2019 |
Bossgem: Bennytechno1@gmail.com Pls share |
Re: Coding Looks Cool. by Bossgem: 7:30am On Nov 28, 2019 |
Maskyy: Sent. |
Re: Coding Looks Cool. by Bossgem: 7:31am On Nov 28, 2019 |
Grandlord: Yes, that's why I like the book. 1 Like |
Re: Coding Looks Cool. by gbolly1151(m): 8:07am On Nov 28, 2019 |
For people who will be writing code you can use this tag [Code] [/Code] (make C small letter) to make the code easy to read for programmers the output will be similar to below code
1 Like 1 Share |
Re: Coding Looks Cool. by Grandlord: 9:11am On Nov 28, 2019 |
Bossgem:Problem is, it doesn't have an answers section where you can check, if you get stuck on an exercise. Do you know of any question and answer kind of book? |
Re: Coding Looks Cool. by Bossgem: 9:39am On Nov 28, 2019 |
Grandlord: Yes, it doesn't have answers. Kinda forces you to produce an answer or search for answers yourself. I don't have a book with exercises and answers. 2 Likes |
Re: Coding Looks Cool. by Maskyy(m): 10:12am On Nov 28, 2019 |
Bossgem: Thanks |
Re: Coding Looks Cool. by Grandlord: 12:31pm On Nov 28, 2019 |
Bossgem:Okay. No wahala. |
Re: Coding Looks Cool. by Maskyy(m): 12:25am On Nov 29, 2019 |
Who know about moat academy in lag. How standard are they. |
Re: Coding Looks Cool. by OutOfTheAshes(m): 9:24am On Dec 02, 2019 |
Who can help me out. It's my school assignment. Write a program that checks if a number is prime. Thanks for your anticipated reply. |
Re: Coding Looks Cool. by Maskyy(m): 1:14pm On Dec 02, 2019 |
OutOfTheAshes: 1 Like
|
Re: Coding Looks Cool. by Maskyy(m): 1:20pm On Dec 02, 2019 |
OutOfTheAshes: function shPrime(num) { var prime = num != 1; for(var i=2; i<num; i++) { if(num % i == 0) { prime = false; break; } } return prime; } console.log(shPrime(3)); |
Re: Coding Looks Cool. by OutOfTheAshes(m): 1:21pm On Dec 02, 2019 |
[quote author=Maskyy post=84553968][/quote] Thanks. What if it's a negative number? Will your code still run? |
Re: Coding Looks Cool. by OutOfTheAshes(m): 1:24pm On Dec 02, 2019 |
Maskyy: If num is < 0, will the program still run? |
Re: Coding Looks Cool. by OutOfTheAshes(m): 1:26pm On Dec 02, 2019 |
Maskyy: What if num = 10^9(1000000000), will the code still run? |
Re: Coding Looks Cool. by Maskyy(m): 1:37pm On Dec 02, 2019 |
OutOfTheAshes:it will check run correctively. |
Re: Coding Looks Cool. by OutOfTheAshes(m): 1:45pm On Dec 02, 2019 |
Maskyy: Will it run when num = -3 1 Like |
Re: Coding Looks Cool. by Grandlord: 2:42pm On Dec 02, 2019 |
[quote author=Maskyy post=84553968][/quote] Bro which text editor is this please? VS code? |
Re: Coding Looks Cool. by Maskyy(m): 4:32pm On Dec 02, 2019 |
Grandlord: Yap 1 Like |
Programming Competition: Search Engine Task. Rewards up for grabs. / Is Python Really Worth The Buzz And Hype It's Getting ? / Where To Go If You Need Programmers Or Advertise Your Programming Skills
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 43 |