Not even a hello world?
|
-
11-20-2015, 08:29 PM #61
-
11-20-2015, 08:39 PM #62
- Join Date: May 2013
- Location: United States
- Posts: 11,516
- Rep Power: 12083
-
11-20-2015, 08:43 PM #63
- Join Date: Mar 2013
- Location: Florida, United States
- Age: 34
- Posts: 6,522
- Rep Power: 76136
-
11-20-2015, 08:51 PM #64
-
-
11-20-2015, 09:12 PM #65
- Join Date: Mar 2013
- Location: Florida, United States
- Age: 34
- Posts: 6,522
- Rep Power: 76136
lol in high school I used to be able to use command prompt and hack other peoples computers in our computer labs. Loved putting sites like meatspin . com on peoples computers while they were out using a hall pass to do something. Cant do that anymore though in most schools due to their systems being way better now.
“Uh, Later Dudes. S you in your A’s, don’t wear a C, and J all over your B’s.”
-Local business owner and cat enthusiast
Always pick 2 crew
-
11-20-2015, 09:13 PM #66
-
11-20-2015, 09:28 PM #67
-
11-20-2015, 09:38 PM #68
-
-
11-20-2015, 09:53 PM #69
-
11-20-2015, 10:22 PM #70
-
11-20-2015, 10:27 PM #71
-
11-20-2015, 10:37 PM #72
Works. Let's get pythonic though...
Code:for i in range(1, 101): result = ["", "Fizz"][i%3 == 0] if i%5 == 0: result+="Buzz" if len(result) == 0: result = int(i) print(result)
Code:for i in range(1,101): print "FizzBuzz"[(i*i%3)*4:8 - ((-i ** 4) % 5)] or i
Last edited by Brad155; 11-20-2015 at 10:46 PM.
-
-
11-20-2015, 10:37 PM #73
Brahs, I recently started my studies and we haven't went that deep into programming yet, but I am having some trouble with some python exercises and so on. HTML, CSS basics I already know and learn them quite easily, we also have had classes about using cmd and I am doing decent there too.
Will I make it? Are there "easier" jobs that I could manage in the future if I am not so strong when it comes to programming?u mirin'?
-
11-20-2015, 10:54 PM #74
-
11-20-2015, 11:05 PM #75
-
11-20-2015, 11:19 PM #76
-
-
11-20-2015, 11:27 PM #77
- Join Date: Mar 2013
- Location: Florida, United States
- Age: 34
- Posts: 6,522
- Rep Power: 76136
-
11-20-2015, 11:37 PM #78
u dont need a cs degree to learn how to program/code
but u need to know how codes work or programs work (thus knowing how to make your own) to get a cs degree
what school did/do you go to OP? theres no way u get a cs degree from my school without knowing how to code, even a minor. even the first core class of CS.... literally 40-60% drop out of that class lmao. u NEED to know how to codeEx-Distance Runner | Ex-Sprinter | Current Bodybuilder/weight lifter
5 Min mile 25 sec 200m 315 S/275DL/190B (5 RM for all)
**INTJ/INFJ somewhere inbetween crew**
**dyel mode unless have pump and flexing crew. aka natty crew.**
-
11-20-2015, 11:40 PM #79
-
11-20-2015, 11:47 PM #80
-
-
11-21-2015, 12:03 AM #81
- Join Date: May 2013
- Location: Alabama, United States
- Age: 29
- Posts: 842
- Rep Power: 490
I'm a physics major and I'm taking a intro programming class for the lols. Took me around 3 min to type this up and test this in python.
FizzBuzz
i = 0
for i in range(0,101):
__if i % 5 == 0:
___if i % 3 == 0:
____print("FizzBuzz")
___else:
____print("Fizz")
_elif i % 3 == 0:
__print("Buzz")
_else:
__print(i)
-
11-21-2015, 12:09 AM #82
-
11-21-2015, 12:11 AM #83
-
11-21-2015, 12:16 AM #84
-
-
11-21-2015, 12:23 AM #85
-
11-21-2015, 12:23 AM #86
lol that this thread is still live. op threw himself off a bridge.
will rep anyone that can help rewrite a CSV. prints to a jumbled mess.
Code:import com.opencsv.*; import java.util.*; import java.io.FileReader; import java.io.FileWriter; public class CSVModifier { public static void main(String[] args) throws Exception { CSVReader reader = new CSVReader(new FileReader("file.csv"), ',', '"', '|', 1, false, false); List<String[]> data = new ArrayList<String[]>(); data = reader.readAll(); reader.close(); for (int i = 0; i < data.size(); i++) { String[] stt = data.get(i); String st = stt[1]; st = st.replaceAll("[ ]{2,}", " "); st = st.replaceAll("\n", ""); st = st.replaceAll("Brand:", "\",\"Brand:"); st = st.replaceAll("ASIN:", "\",\"ASIN:"); st = st.replaceAll("Seller:", "\",\"Seller:"); stt[1] = st; data.set(i, stt); //System.out.println(st); } //CSVWriter writer = new CSVWriter(new FileWriter("fileMod.csv")); FileWriter writer = new FileWriter("fileMod.csv"); for (String[] temp : data) { for (int i = 0; i < temp.length; i++) { String temps = temp[i]; writer.write(temps); } } writer.close(); } }
I lift therefore I am.
-
11-21-2015, 12:28 AM #87
The Fizz Buzz test really needs to be restated.
I would ask given a number 1 to n, not 1 to 100.
Some cheeky chit could come along and just do:
Code:int main() { char * U = "wot"; int m = 8; printf("12Fizz4BuzzFizz7%dFizzBuzz...etc", m); return m - 8; }
-
11-21-2015, 12:31 AM #88
-
-
11-21-2015, 12:40 AM #89
-
11-21-2015, 08:10 AM #90
Similar Threads
-
Realistically, how much can I earn with a bachelor (srs)
By koh19 in forum Misc.Replies: 107Last Post: 07-19-2009, 02:53 PM
Bookmarks