Don't wanna be here? Send us removal request.
Text
task_004, seconds since birth
This program gets the date from the input variables and then subtracts that date from the current date. This is multiplied by 365*24*365 to get the amount of seconds in all those days. This script ignores when you were born but who would care anyway.
0 notes
Text
task_003, Temperature conversion
This task was about temperature conversion. I made a python script that can check the paramters you start it with and the print the converter temperatures.
The script checks for errors with the input and exits with an error message if something is wrong.
0 notes
Text
task_002, coin toss
With such simplistic task instructions it also becomes a task to actually determine what i am suppsed to do. In this case i decided to make a program that is like a coin you throw it(run it) and you get either head or tails.
#Coin toss import random exit(random.choice(("Head","Tails")))
0 notes
Text
task_001, name generator
The first challenge is a name generator. The are some different ways to go about this:
Name lists from census data.
Generating random syllables and stringing them together.
The first is simple enough so i chose instead to go with the second one, generating names. Names consist most often of one ore more syllables. A syllable has one wovel and multiple consonants.
I decided i did not want to spend to much time sooing this so i wnt with the easy option:
Two lists one with wovels and the other with consonants. A function to generate a syllable and putting two of those together to make a name. Could this function make your name? It generates mostly wierd sounding stuff but with some gems.
rudquw pavrit rakrib nosum veka leplic zekwuy harher eyxuk dujhad seckey mobhaf zutgik qajzaw ovfoc coqfuj ayiw daqxuz gexyak ruzpot
I will definatly revisit this one with time. Some people have made some really impressive generators online. python code included below:
#navn generator import random vok=("a","e","i","o","u") kon=("","b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z") def syl(): return random.choice(kon)+random.choice(vok)+random.choice(kon) for x in range(20): print(syl()+syl())
0 notes
Photo
Found this image in a thread. Figured it would be a nice change of pace to try my hand at some programming challenges. I will try to trough these sequentially and explaining everything as i go along.
This is my first blog so i would appreciate anny and all feedback you would care to give.
For now lets start on the tasks. I have compleated two already and will be posting them shortly.
0 notes