[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Alright so I learned some basic syntax? What now?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 25
Thread images: 3
Alright so I learned some basic syntax? What now?
>>
You code.

Code with the wind, my child.
>>
There are approximately 3.156 x 10^7 seconds in a year. Write a program that requests your age in years and then displays the equivalent number of seconds.

The mass of a single molecule of water is about 3.0x10^-23 grams. A quart of water is about 950 grams. Write a program that requests an amount of water, in quarts, and displays the number of water molecules in that amount.


There are 2.54 centimeters to the inch. Write a program that asks you to enter your height in inches and then displays your height in centimeters. Or, if you prefer, ask for the height in centimeters and convert that to inches.
>>
>>54873188
>There are approximately 3.156 x 10^7 seconds in a year. Write a program that requests your age in years and then displays the equivalent number of seconds.
>not asking for the hour of birth
>not asking for the second of birth
>just guessing everyone was born at midnight that day
oh brother.
>>
>>54873203
>not asking the date and year of birth then taking leap years into account.
>>
>>54873232
>not checking if the user has ever been briefly dead like during a surgery gone awry or something
>>
>>54873232
>not calculating the median average amount of people that were born at the same time as you were.
>>
>>54873188
>>54873203
>>54873232
>>54873260
>programming while autism
not even once
>>
>>54873274
okay thanks.
>>
>>54873087
Go to college for a real career, like your physician sister.
>>
>>54873301
Math and statistics starting next year. I'm warming myself up for R language.
>>
According to codecademy I can now program in Java. What now?
>>
>>54873308
>I'm warming myself up for R language.
my stomach just turned.
>>
>>54873188
(defn age-in-seconds [age] (* age 365 24 60 60))

(defn water-mols [quarts] (* (/ (* quarts 950) 18) 6.022e23))

(defn height-in-cms [inches] (* inches 2.54))

(println "Imperial units are disgusting.")
>>
>>54873688
Actuary here

R is easy to use and a vital skill for my job. I was a CS major in college so I used to laugh at it too for not being a real language, but I make way more as an actuary than I ever did as a programmer.
>>
>>54873232
>not asking which timezone the user was born in
>>
>>54873913
>R is easy to use
ugh. have you used other languages? R's entire concept of "workspaces" is just mind-bending. it's like someone wanted a programming language to just annoy the ever-lasting shit out of programmers.

>not being a real language
no, it's a real language. it's not like someone's pointing to HTML and calling it a programming language here; it's just incredibly frustrating (and, honestly, not redeeming on performance).

its saving grace is that mathematicians use it so much that its libraries are especially well-suited to numerical stuff on the basis of *accuracy* (but not necessarily performance, as previously stated).
>>
>>54873087

I learned python first and started doing things to help in my day to day. I was making reports for epa shit for private waste disposal companies and found openpyxl or something for manipulating excel spreadsheets. I made scripts to make up spreadsheets and save a ton of time at work.

Spent the time studying more code. Made a rss reader from scratch at first just to learn a bit. Then got into the library called beutiful soup once I understood what was under the hood and got way more advanced. I am still tweaking what I built and it runs on a freenas jail constantly curating my own news feed.

Also picked up the pygame library. I dont expect to do anything useful with it but it its a somewhat interesting way to practice.

Kinda makes me want to move on to C++.
>>
What are some tasks/programs i should implement when I'm learning a new programming language? Like what would be a few good, basic shit that'll actually test my knowledge of a new language instead of FizzBuzz and >>54873188 "enter user input and apply a single factor and print" shit
>>
File: 4L_FVCdDOcE.jpg (603 KB, 2000x1335) Image search: [Google]
4L_FVCdDOcE.jpg
603 KB, 2000x1335
>>54873087
Start a boot camp to teach women to code.
>>
>>54874638
god damn she's cute. i want to fuck her sexy lips
>>
>>54873913
Any tips other than preparing my butthole?
>>
>>54874679
>mouthbreather
>sexy lips
>>>/lgbt/
>>
>>54874638
Is there a video? I wonder what they are talking about.
>>
>>54874460
Make some function to return a 2D array of points of a circle.

Then expand this function to accept another function as an argument so it is generic and can be used with arbitrary functions. Save the points of multiple functions in the same array.

Then create another function to take the array you just created and plot in the terminal or in your languages canvas object. This will give you a chance to flex your math muscles a little because you will have to make sure that the plotting function scales the graph up or down and fixes the ratio (if you are plotting in the terminal)

Then you can go wild. Try plotting in 3 dimensions, manually manage the memory, add animation, colours or even better use only the standard library to plot to a bmp file.

After that you can start making some basic data structures and algorithms like binary trees, graphs, dijkstra's shortest path, etc. There are always fun.
Thread replies: 25
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.