Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,645 members, 7,958,955 topics. Date: Thursday, 26 September 2024 at 08:07 AM |
Nairaland Forum / Scarplanet's Profile / Scarplanet's Posts
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 31 pages)
Investment / Re: Litecoin Wallet by scarplanet(m): 1:11am On Dec 02, 2020 |
Use Binance |
Software/Programmer Market / Re: Do You Want Paid Udemy Courses For Free? Get In Here by scarplanet(m): 8:35am On Jun 17, 2020 |
ThatPetiteChic: Not Free. Well done @EazyJ, you are doing well. 1 Like |
Romance / Re: I Need You Advice by scarplanet(m): 11:20pm On Jun 07, 2020 |
Programming / Re: Python 3: Exercises And Solutions. by scarplanet(m): 7:31pm On Jun 04, 2020 |
class Solution: |
Programming / Re: Python 3: Exercises And Solutions. by scarplanet(m): 7:28pm On Jun 04, 2020 |
iCode2: . |
Programming / Re: Data Structures And Algorithms: A Beginner's Journey. by scarplanet(m): 2:16pm On Jun 04, 2020 |
Paying attention.... 1 Like |
Programming / Re: Programming Learning Challenge June. by scarplanet(m): 2:10pm On Jun 04, 2020 |
SQL |
Programming / Re: Data Science Advise Please by scarplanet(m): 6:39pm On May 25, 2020 |
omoluabiguy: You claim to be a Software industry veteran, and this is the "wack" response you can give to a simple question?? I pity those you have been teaching! 1 Like |
Programming / Re: Let Learn Artificial Neutral Network by scarplanet(m): 1:45pm On May 21, 2020 |
Health / Re: How I Burnt My Chest After Using Harsh Chemicals On It (Graphic) by scarplanet(m): 1:36pm On May 21, 2020 |
Dont Joke with this please oo.. Cancer can easily set in if your arent careful. See qualified medical practitioner immediately |
Programming / Re: Let Learn Artificial Neutral Network by scarplanet(m): 9:54pm On May 20, 2020 |
gbolly1151: Nice one Tag 1 Like |
Programming / Re: Which Programming Language Should A Beginner Start With? by scarplanet(m): 2:32am On May 19, 2020 |
Oladara003: Why do you want to mask your IP.... Are you doing something illegal? |
Programming / Re: Why Is Python Programming So Hard To Understand by scarplanet(m): 2:19pm On Apr 29, 2020 |
gbolly1151: Anyways, not many persons will agree with you that Pycharm is the best. Do you realise that Pycharm is not entirely free?? Just use the IDE you feel most comfortable with and that works well for you. Other IDEs include Jupyter, Eclipse, Visual Studio, Spyder, Sublime Text e.t.c 1 Like |
Programming / Re: Python 3: Exercises And Solutions. by scarplanet(m): 12:57am On Apr 29, 2020 |
SKYQUEST: Is this a job at your workplace or an assignment given to you? Oya confess 1 Like |
Programming / Re: A Thread For Tutorial On Python Programming by scarplanet(m): 12:54am On Apr 29, 2020 |
LordAA: Materials to learn what precisely? |
Programming / Re: A Thread For Tutorial On Python Programming by scarplanet(m): 6:42pm On Apr 28, 2020 |
LordAA: Hello... What do you wish to get done? 1 Like |
Programming / Re: A Thread For Tutorial On Python Programming by scarplanet(m): 6:41pm On Apr 28, 2020 |
Tobiee:yeah you can |
Programming / Re: Can Someone Help Me With A Solution To This Python Problem by scarplanet(m): 12:04pm On Apr 28, 2020 |
silento: I am sure farmsata understands we are just trying to get under each other's skin; I don't see how I am making fun of him. If trying to point out something means I am mocking the person, then I'll hold my peace moving forward. And No, I dont know all of python. No one is a bundle of knowledge. Cheers |
Programming / Re: Can Someone Help Me With A Solution To This Python Problem by scarplanet(m): 7:32am On Apr 28, 2020 |
farmsata: 1. Line 3 is not necessary. Memory space is being wasted initializing largenum = 0. 2. Your code will yield no result If num1 is larger. 1 Like |
Programming / Re: Can Someone Help Me With A Solution To This Python Problem by scarplanet(m): 7:22am On Apr 28, 2020 |
silento: Like I said, you can never tell the behavior and intent of the users of your code. What if someone someday decides to compare floating numbers? It's best to use the correct syntax, eval() |
Programming / Re: Can Someone Help Me With A Solution To This Python Problem by scarplanet(m): 12:00am On Apr 28, 2020 |
farmsata: if num1 == num2, then num1 cannot be the larger number?? |
Programming / Re: Can Someone Help Me With A Solution To This Python Problem by scarplanet(m): 10:28pm On Apr 27, 2020 |
jjmk: First, your code is 95% correct. However Like you have been already told, variable names are case sensitive. You started with Num1 and Num2; then i switched to num1 and num2. Red flag! Secondly, python builtin functions always start in lower case... have that imprinted at the back of your mind. Therefore "if" and "else" should start in lower case, "print" also. Third, I have seen a lot of young programmers use int() with the input() function. That is TOTALLY WRONG. Let me tell you why. If in this your code you are to find the larger number between 20.2 and 20.3. When you use int() with input(), then both values will be rounded to the nearest integer and 20 will be returned. You see, the goal is defeated. I have also seen some people say you can use float() with input() if you want to enter a floating number. However, remember that you don't write a code for your own use, it is for others to use and maybe reproduce. So in a case where u have used float() and a user of your code enters 20 in the input, it is automatically converted into 20.0 float value. This alone is enough to distort the final result. Note that in programming, 20 and 20.0 are not thesame! So then, what should you use? Well not many person might know, but whenever you want to return a non-string value with the input() function, the best function to use is eval(). To be used as eval(input("say something" )). Cheers 3 Likes |
Programming / Re: Python 3: Exercises And Solutions. by scarplanet(m): 12:29pm On Apr 27, 2020 |
jayphe: Unfortunately, Nairaland would not allow indentation class Student: def __init__(self, firstname, lastname, matric, course): self.firstname = firstname self.lastname = lastname self.matric = matric self.course = course def grade(self, score): if score >= 95: return "A" elif score >= 85: return "B" elif score >= 70: return "C" elif score >= 60: return " D " elif score >= 50: return "E" else: return "F" def fullname(self): return "{} {}".format(self.firstname, self.lastname) first = input("Enter Firstname of Student: " ) last = input("Enter Lastname of Student: " ) matricNo = input("Enter Matriculation Number of Student: " ) coursecode = input("Enter the Course Code: " ) studentscore = eval(input("Enter the Score for Student: " )) stud1 = Student(first, last, matricNo, coursecode) print("{}, {}, {}, Grade {}".format(stud1.fullname(), stud1.matric, stud1.course, stud1.grade(studentscore))) 1 Like |
Programming / Re: Python 3: Exercises And Solutions. by scarplanet(m): 10:10pm On Apr 26, 2020 |
jayphe: site = "http://www.thapar.edu/index.php/about-us/mission" a, b = site.split(sep="//" ) c = b.split(sep="/ " )[0] d, e, f = c.split(sep="." ) print("{}.{}".format(e, f)) 1 Like |
Programming / Re: Common good python programming practices you should know by scarplanet(m): 9:11pm On Apr 25, 2020 |
Well done chief 1 Like |
Programming / Re: Let's Learn Python Together by scarplanet(m): 11:02am On Apr 24, 2020 |
http:??//short??url.??at/ktzN8 |
Programming / Re: Let's Learn Python Together by scarplanet(m): 3:22pm On Apr 21, 2020 |
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 31 pages)
(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 |