Programming › . by Daddyshome(op): 8:15pm On Jan 23, 2021*. Modified: 11:33pm On Feb 01, 2021 |
. |
European Football (EPL, UEFA, La Liga) › Re: Official Manchester United Fan Thread:''20 Times EPL Champion by Daddyshome: 9:58pm On Jan 01, 2021 |
CapitalCee: Take a bow Sir Eric Bailly!!!. Easily our best defender by a mile. If he stays fit who need Upamecano. That's the problem he cannot stay fit. |
Programming › Re: Programming Learning Challenge June. by Daddyshome: 4:54pm On Jun 06, 2020 |
Slawormir: Damnnnnn niggarrr Isoright
Python
I want to know more about software architecture And java script
Have been trying to perfect Fortran although it is one old fuckkking programming language but i need it because of automatic controls in machine Fortran Almost turned me into a mad man with more than four laptops Are you a mechanical engineering student? |
Programming › Re: Diary Of A Computer Science Student. by Daddyshome(op): 5:12pm On Jun 01, 2020 |
DriggityDre: Whoa. Maybe it was a spambot.
To be safe, just use the code tag ~ [_code][/code_]
print( "Nairaland Forum" ) Thanks |
Programming › Re: Diary Of A Computer Science Student. by Daddyshome(op): 2:21pm On May 31, 2020 |
Has anyone heard of Microsoft Imagine cup?
|
Programming › Re: Diary Of A Computer Science Student. by Daddyshome(op): 2:16pm On May 31, 2020 |
maleekstarboy1: I'm not a computer science Stundent, I'm a Cyber Security student.
I loved Cyber Security as a course and I applied in Federal University of Technology Minna, though I was denied on several occassion and now I am admitted in the school.
I love Cyber Forensic, we deal with studying a case, making research and combining inference to get to the root of a case.
Well to know more about Cyber Security you can read through if you would love to choose a career.
What is Cyber Security?
https://www.thecomputersecurity.com/2020/03/what-is-cybersecurity.html?m=1
Various salaries in Cyber Security
https://www.thecomputersecurity.com/2020/01/cyber-security-2020-salary.html?m=1 Nice one. I am not really a fan of cyber security, I feel it's for the gods. What if your company gets hacked and loses millions that means you failed. I don't think I can handle that responsibility. |
Programming › Re: Diary Of A Computer Science Student. by Daddyshome(op): 2:05pm On May 31, 2020 |
DeHill: contact me, Bro. I'm a computer programmer like you! We can work together. Email: chidimatthew10@gmail.com Phone: 08029228777 Alright bro |
Programming › Re: Diary Of A Computer Science Student. by Daddyshome(op): 2:04pm On May 31, 2020 |
I am back. Got banned for posting my code  . Isn't this section supposed to be about programming? |
|
Programming › Re: Diary Of A Computer Science Student. by Daddyshome(op): 9:33am On May 29, 2020 |
|
Programming › Re: Diary Of A Computer Science Student. by Daddyshome(op): 9:33am On May 29, 2020 |
gracefoundmme: Ride on bro same with me...
Also try and know framework like Django too , you gonna like it I will eventually. Right now I am taking my time. |
Programming › Diary Of A Computer Science Student. by Daddyshome(op): 12:02am On May 29, 2020 |
I have been learning Python for about two months now. Prior to that, I knew a little C and Java, so programming wasn't totally new to me when started Python. Procrastination has hindered me a lot in the past, but I have been able to build the habit of programming by coding everyday for the past two months. I created this thread to share my programming journey as it unfolds. So every day I will share what I learnt and also my code here. I hope to make friends here, both beginners and experts. Currently learning Python and Pascal. Pascal is just for school and as soon as I write my exam on it, it will be replaced with Assembly (again school work but I am more intrigued by this).
I am currently learning how to make gui's using tkinter. I made a simple calculator today. My laptop's battery is currently dead, so I'll share the code here tomorrow. For Pascal, I attempted to implement a binary search algorithm to guess a random number. After each guesses I'll tell the computer if it needs to guess higher or lower (done this before with Python). There was a bug which I was trying to fix before my laptop shutdown. |
Programming › Re: Diib Nigeria Research Laboratory by Daddyshome: 8:40am On May 23, 2020 |
Tim1212: Please illustrate with number line, so others can understand. In other to reach 7 from 5, you have to move two steps in the positive direction (right side of 5). The more you move to the right, the larger a number becomes.
|
Programming › Re: Diib Nigeria Research Laboratory by Daddyshome: 8:26am On May 23, 2020 |
Tim1212: Who can answer this question?
Why is 5 < 7 Because you can add a positive number to 5 to get to 7. |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 7:56am On May 10, 2020 |
jayphe:
Phew!! I'm sorry for that long break. I know many people for don vex. I'm sorry. I'm back with an exercise but this one is kinda simple. Exercise 7 Write a Python program that accepts data from the user be it integer, string, char, float or double. The program stores these in a container/array (list or tuple)
Finally, the program accepts an index from the user and uses the index to find the respective element if the array created. The program then prints the result.e.g., Let's say a user inputs the following: Sam 12 Ben Lagos 22 Tolu
The user then input 3 as the index, the program must return 'Ben' as the output.
Collinsanele Taofeekdboy kensmoney Daddyshome Zabiboy and lots more...lol! Are the inputs on the same line? |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 8:54am On May 01, 2020 |
gbolly1151: Check your code bro,it doesn't seem right It's the indentation. |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 8:49am On May 01, 2020 |
Collinsanele: Nice but if there's no unique item, then, you would have an index error. OK, then I'll put an if statement. def unique_num(lis): unique = [x for x in lis if lis.count(x) == 1] if len(unique) > 0: return unique[0] |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 11:15am On Apr 30, 2020 |
Collinsanele: Write a function that takes a list of numbers and returns the first unique number in the list. (You may submit your solutions via pastebin)
Example: [1,4,6,1,8,4,9] -> returns 6 lis = [1, 4, 6, 1, 8, 4, 9] unique = [x for x in lis if lis.count(x) == 1] print(unique[0]) |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 10:56am On Apr 30, 2020 |
jayphe:
Exercise 6 Write a Python program that accepts an integer number and checks if it is an even number or an odd number. Pls don't use the % (modulus) operator. Let's see some genuius.
def odd_even_checker(num): if num[-1] in ['1', '3', '5', '7', '9']: return 'odd' elif num[-1] in ['0', '2', '4', '6', '8']: return 'even' num = input() print(odd_even_checker(num)) |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 10:40am On Apr 30, 2020 |
gbolly1151: Nice one...by the time you learn class...you will really appreciate what you have done here,this is good for a start Thank you sir |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 8:08am On Apr 30, 2020 |
Collinsanele: contact _date list is misleading as there aren't any date in it (Lol).
To use dates in Python, you can make use of the datetime module, it's straight forward, however, nice program. Thanks I'll look into that. The list is ranked by first one created that's the closest thing to date I know currently. |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 11:13pm On Apr 26, 2020 |
jayphe:
Exercise 5 Write a Python program that accepts a string and a character from the user. The program checks the number of times(frequency) the character appeared in the string. E.g. If the user enters "Michael Faraday" as the string and enters 'a' as the character, the program should display:
There are 4 a in Michael Faraday!
Collinsanele Taofeekdboy kensmoney Daddyshome Zabiboy
string = input('Enter a string') char = input('Enter a character in the string') print('{} appears {} times in the word {}'.format(char, string.casefold().count(char.casefold()), string )) |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 10:56pm On Apr 26, 2020 |
Zabiboy: [b] Ok guys....concerning my last post on real life applications of python, here are some projects you can try...
1) CONTACT BOOK; The main objective of this project is to save contact details. It’s important that you set up the commands users can use to enter the contact details. Some features you should implement include the commands to delete contacts, update contact information, and list saved contacts. You can also allow users to list contacts using different parameters, such as alphabetical order or contact creation date.. For those who already know django, this would be easier.
2) SITE CONNECTIVITY CHECKER: When you visit a URL, you expect to get the requested pages on your browser. But this is not always the case. Sometimes, sites can be down, so you won’t get the desired results. Instead, you’ll be presented with error messages. You can keep trying a site that is down, till it comes up and you get the information you need.
This is where the Site Connectivity Checker project comes in. The Site Connectivity Checker visits a URL and returns the status of the URL: it is either live or not.
The main objective of this project is to check the status of sites. So, you need to write code for checking the status of a website.....
Those who learnt socket programming in python would find this easier..
3) BULK FILE RENAME TOOL: Sometimes, you need to name all the files in a directory according to certain conventions. For example, you can name all the files in a directory with File0001.jpg, where the numbers increase based on the number of files in the directory. Doing this manually can be stressful and repetitive.
The Bulk File Rename Tool allows users to rename a large number of files, without having to manually rename files.
The main objective of this project idea is to rename files. So, the application needs to find a way to manipulate the target files. The os, sys, and shutil libraries will be useful for a large part of this project.
Your users will be able to rename all the files in the directory, using naming conventions. Therefore, they should be able to pass in the naming convention of choice. The regex module will help match the required naming patterns, if you understand how regex works.
Lets start with these three...More would be posted as we progress....
GL.... [/b] Note: I am a beginner, so don't expect clean code. Also, I suck at naming variables . It can definitely be improved upon. I can protect the code with trys here and there, to prevent certain errors. I don't know if the list is necessary, but I don't know any way to sort dictionaries by time or maybe I should have stored the contacts using another data type. Criticism is welcome  contacts = dict() contacts_date = list() def save_contact(name, number): contacts[name] = number contacts_date.append([name, number]) print('contact saved') def display_contact_alphabetical(): print('Name\tNumbers') for i, j in sorted(contacts.items()): print( '{}\t{}'.format(i, j)) def delete(name): contacts_date.remove([name, contacts[name]]) del contacts[name] print('contact deleted') def display_contact_date(): for a, b in contacts_date: print('{}\t{}'.format(a, b)) def edit_contact_name(old_name, new_name): tmp = contacts[new_name] delete(old_name) save_contact(new_name, tmp) print('Contact information updated') def edit_contact_num(name, new_num): delete(name) save_contact(name, new_num) print('Contact information updated') while True: print('Press \n1. To save a contact\n2. To display contats\n3. To delete a contact\n4. To edit a contact\n5. To quit') user_input = int(input()) if user_input == 1: response_to_one = input('Enter name and number') cont_name, cont_num = response_to_one.split() save_contact(cont_name, cont_num) elif user_input == 2: print('Press \n1. To display alphabetically\n2. To display by time') reply = int(input()) if reply == 1: display_contact_alphabetical() elif reply == 2: display_contact_date() elif user_input == 3: response_to_three = input('Enter name') delete(response_to_three) elif user_input == 4: print('Press \n1. To edit contact name\n2. To edit contact number') reply_two = int(input()) if reply_two == 1: reply_two_one = input('Enter old name and new name') old_name, new_name = reply_two_one.split() edit_contact_name(old_name, new_name) elif reply_two == 2: reply_two_two = input('Enter name and number') cont_name, cont_num = reply_two_two.split() edit_contact_num(cont_name, cont_num) elif user_input == 5: print('Exiting') break |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 7:53pm On Apr 25, 2020 |
Zabiboy: If anyone is doing any of the projects i listed, Jzt indicate the one u r doing... GL Working on the first one. |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 1:54pm On Apr 25, 2020 |
jayphe:
Collinsanele Taofeekdboy kensmoney Daddyshome Zabiboy
hmm....who else ooo? Let's get to business. Pls, let's try to read the question in details first. If the question asks for the users' input, then we should include an input statement. Zabiboy we need to talk ooo. This one wey I no see you....
Exercise 4 We are doing some 'loop and looping stuffs' today.
Write a Python program that accepts the name of a student, matric number, course code and the score he/she got in the course. E.g Name: John Alfred Matric. No.: MUC/CS/014/0882 Course Code: CMP 212 Score: 100
The program then print the result as: John Alfred, MUC/CS/014/0882, CMP 212, Grade A
Using this grading table. 100-95 A 94-85 B 84-70 C 69-60 D 59-50 E 49-0 F
Corrections, advices, suggestions and opinions are highly welcome! name = input() mat_no = input() course_code = input() score = int(input()) def grade(score): if score in range(95, 101): return 'A' if score in range(85, 95): return 'B' if score in range(70, 85): return "C" if score in range(60, 70): return " D " if score in range(50, 60): return "E" if score in range(0, 50): return "F" print('{}, {}, {} Grade {}'.format(name, mat_no, course_code, grade(score))) |
Programming › Re: Python 3: Exercises And Solutions. by Daddyshome: 12:08am On Apr 25, 2020 |
jayphe:
Collinsanele, Taofeekdboy, kensmoney another one is here!
Exercise 3
Write a Python program that accepts day, month and year from the user and prints the result in this form:
Today is 23/04/2020 For example, Input: day = 21 mnth = 07 year = 2010
Output: Today is 21/07/2010
Good luck guys!
day = int(input()) month = int(input()) year = int(input()) print("Today is {:02}/{:02}/{}".format(day, month, year)) |
Properties › Re: My Landlord Wants To Evict Me Before My Rent Expires by Daddyshome: 11:05am On Apr 02, 2020 |
Ed12: January to December makes a year.
And not January to January! 1st of January to 31st of December makes a year(365 days). He paid April 18th so he's rent is due on the 16th(365 days) cos this year is a leap year. Not sure if it matters if it's a leap year, if not then it's on the 17th. |
Programming › Re: Pygame In Isloation by Daddyshome: 7:08pm On Apr 01, 2020 |
Looks nice |
Romance › Re: Step In Here, Lets Play Some S*x Games by Daddyshome: 3:15pm On Apr 01, 2020 |
Would you like to get some vitamin D  |
Health › Re: 12 New COVID-19 Cases Confirmed By NCDC, Total Now 151 by Daddyshome: 2:04pm On Apr 01, 2020 |
lepasharon: He's gone awol If that's true then we are screwed |
Health › Re: 12 New COVID-19 Cases Confirmed By NCDC, Total Now 151 by Daddyshome: 12:46pm On Apr 01, 2020*. Modified: 4:34am On Apr 04, 2020 |
God help us. Edit: I would like to dedicate this FTC to my crush  |
Jobs/Vacancies › Re: Wellspring University Academic Massive Job Recruitment (20 Positions) by Daddyshome: 7:24am On Mar 25, 2020 |
holluwizzy: Well, it's a good school Population not much Discipline is the case A stubborn or naughty student can not attend the institution. Hostel for Freshers in the compound for girls and opposite the school for boiz.
Conducive environment. Mixed races there in student aspect.
No freedom of movement to sleep outside the school and if you have to , your parents or guardians will be called to xondirm. Thanks for replying. Do you know how good computer science is over there? |