#ug-computer-science
1 messages · Page 1 of 1 (latest)
(@soft apex ) printf is misspelt as pritnf
didn't realize how old this was
but I recommend you post errors next time
C?
Good day, folks I want to ask if anyone here has any ideas on where I should start and what topics come in basic since I don't know much about computer science and my test is on December 12th (it's the basic one like so basic). I was initially studying medical but I was unable to pass the entrance test, so I'm now studying computer science. I would be very grateful if anyone here could offer guidance on where to start and what supplies are fundamental.
use @fiery ginkgo w3 schools
for beginners
I want to ask, why when if (n3 = n1+n2)), the first if statement is executed? and not skipped.
and what is i||j?? what does it do inside the if function?
Help needed <@&597298407476035596>
It’s useless in this case, does nothing
means nothing is compared?
we can just assume that, i||j doesnt exists for the function, like we comment them
Yeah
alright how about the other one
Don’t you want to put braces though
where??
Everywhere?
not necessary if there is only 1 line
Ugly as hell either way
cuz computer will read the next line under if or else statement
yeaa ik but thats my question paper
LOOOOL
i always use bracelets
Especially
Yeah
As for the first
(n3=n1+n2) is probably “truthy” and so the body of the if statement runs
also this one, why 0 cant execute the if function?
if i change them to like 2,3 4 and so on, they will output min number
define truthy?
yeah but this code they still be able to run
what's not even the true condition?'
I'm saying it ends up a "truthy" value
n3 will now become 5
which is why
because it's assigning and then checking if that value is non 0
ahhh
OHHH
so that if condition
is checking
if n3 is non 0
if yes, then cout the numbers
or not, Idk haven't touched c++ in 2 months but yeah something along those lines
hahahaha
so then which is why, minNum = 0 condition is not printed, because minNum is now 0, and it checks that if it is non 0, which is false
yep
n3 = 5
and check if 5 is non 0
so it is true
yeah
Gave +1 rep to un1ND3X#1594
no problem
I dont get wdym
using namespace std;
int main()
{
int n1, n2, n3;
cout<<"\nEnter three numbers: ";
cin>>n1>>n2>>n3;
if(5!=0)
cout<<n1<<" "<<n2;
else
cout<<n1*2<<" "<<n2*2<<" "<<n3*2;
}```
i got it already, they are basically asking this ^ @fiery ginkgo
they're asking why when (n3 = n1+n2)), the first if statement is executed and not skipped
that's pretty much exactly what
i have tried using negative values, it also print out n1 and n2 based on this code
Help needed <@&597298407476035596>
Help needed <@&597298407476035596>
This would just be a signed 8 bit integer
with 0000000 being 1
instead of 0
All of them will be 8 bit signed?
Can you suggest me some resource from where I can learn this concept, I'm completely lost
Okay, n bits can store 2^n values so 8 bits would be able to store 256 values if it is unsigned we can store integers from 0 to 255 they make up 256 values together. If you have a signed integer, you can only use 7 bits since one is used for storing whether it's positive or negative. If you have 7 bits you can go from either positive or negative 0 to 127. Since we want to store 128 and -128, we'd have to not use the first value as 0 and instead start counting at 1. So that'd be positive or negative 1 to 128 ig. I'm not really sure what ur teacher expects here tho cuz I've never taken a CS course.
This link may be useful tho: https://www.physicsandmathstutor.com/computer-science-revision/a-level-ocr/data-types-structures-algorithms-as/
I did not use the Hint given from the question, but lecturer said I have to use it and follow all instructions from the question. so how do apply the hint inside the code?
what I have ask the lecturer about is you need to call the circle function as circle c(x,y) not circle c(x,1)
Help needed <@&597298407476035596>
Why x, y?
You only need one value to get the area
Your question isn’t clear
to make sure that you use the same class and the function when you call it
i use x y from the sample output since it ask for x y
yeah for the radius yes
it’s like
you cin x but didn’t cin y
so y wasn’t used
c++
Ig use c(x,x)
hmmm okkk
`#include <iostream>
using namespace std;
class shape
{
private:
double x1,y1 ;
public:
void get_data(double x,double y)
{
x1=x;
y1=y;
}
virtual void display_area()
{
}
getarea()
{
double a=x1*y1;
return a;
}
};
class triangle: public shape
{
public:
triangle(double x,double y)
{
get_data(x,y);
}
void display_area()
{
double tarea;
tarea = getarea()/2;
cout<<"Area of triangle is: "<<tarea<<endl;
}
};
class rectangle: public shape
{
public:
rectangle(double x,double y)
{
get_data(x,y);
}
void display_area()
{
double rarea;
rarea = getarea();
cout<<"Area of rectangle is: "<<rarea<<endl;
}
};
class circle: public shape
{
public:
circle(double x,double y)
{
get_data(x,y);
}
void display_area()
{
double carea;
carea = getarea()*getarea()*3.1416;
cout<<"Area of circle is : "<<carea<<endl;
}
};
int main()
{
double x,y;
cout<<"Enter the values of x & Y for triangle: ";
cin>>x>>y;
triangle t(x,y);
cout<<"Enter the values of x & Y for rectangle: ";
cin>>x>>y;
rectangle r(x,y);
cout<<"Enter the radius circle: ";
cin>>x;
circle c(x,1);
t.display_area();
r.display_area();
c.display_area();
return 0;
}`
i forgot to send u guys the code
and that doesnt work
Help needed <@&597298407476035596>
but without referring to my code and question, how would you solve this one?
nevermind
this one can right?
`#include <iostream>
using namespace std;
class shape
{
private:
double x1,y1 ;
public:
void get_data(double x,double y)
{
x1=x;
if(y==0)
{
y1 = 1;
}
else
{
y1 = y;
}
}
virtual void display_area()
{
}
getarea()
{
double a=x1*y1;
return a;
}
};
class triangle: public shape
{
public:
triangle(double x,double y)
{
get_data(x,y);
}
void display_area()
{
double tarea;
tarea = getarea()/2;
cout<<"Area of triangle is: "<<tarea<<endl;
}
};
class rectangle: public shape
{
public:
rectangle(double x,double y)
{
get_data(x,y);
}
void display_area()
{
double rarea;
rarea = getarea();
cout<<"Area of rectangle is: "<<rarea<<endl;
}
};
class circle: public shape
{
public:
circle(double x,double y)
{
get_data(x,y);
}
void display_area()
{
double carea;
carea = getarea()*getarea()*3.1416;
cout<<"Area of circle is : "<<carea<<endl;
}
};
int main()
{
double x,y;
cout<<"Enter the values of x & Y for triangle: ";
cin>>x>>y;
triangle t(x,y);
cout<<"Enter the values of x & Y for rectangle: ";
cin>>x>>y;
rectangle r(x,y);
cout<<"Enter the radius circle: ";
cin>>x;
circle c(x,0);
t.display_area();
r.display_area();
c.display_area();
return 0;
}`
Help needed <@&597298407476035596>
Why do you check if it’s 0 and then set it to 1
Why don’t you just do y1=y and use y=1?
next time please use ` three times to make it more readable
nevermind things already solved
okay
bachelor of science in computer science VS bachelor of science in mathematics and data science
what are the differences and what career options would i have after graduating?
i need to choose one and i literally dont know which one to pick
any advice would be helpful
I would go for a bachelor of science in maths and data science, computer science doesn't require a bachelor. As long as you have the skills and experience in computer science you can get into it at any time, I don't know about data science but it would probably be the same
Does uk computer science degree tough than US and which programming language UK students use mostly
And how tough is to balance work and life pursuing CS?
I don't exactly remember how to do this, but I'm pretty sure it's in the A2 computer science textbook
yeah Eminem is right
Is IT degree cheaper than CS degree?? Any idea
Use the DecimalFormat class
ok thnx
String.format("%.2f",4.8)
It's a string?
no its a double
yea then check out DecimalFormat with argument 0.00
the output? yes
does it matter if I make 4.80 a string? nope
yea you're right
no point in storing in a DecimalFormat object here
I was thinking of it in a way of storing it in a way such that it is 4.80, yk
CS MAJORS UPRISE 🔥 🔥
does data sci count
UPRISEEEEE
hello good morning i major in chatgpt
good morning sir i major in bing chatbot
how can i help you
bard specialist 
i majored from ug bard
real
hello, im not sure if this is the right channel to ask, but i'm planning to take data science as a major in university, but i didn't take as/a2 computer science. i thought that maybe i could cover the syllabus during holidays, and i want to ask if it's beneficial to learn it or should i learn computer science elsewhere?
Learn elsewhere
Look at some college courses
Better
You don’t need A level cs
It’s bs anyways
lol what
ok thanks
Gave +1 rep to (Standard Deviation) Male#2029
it's not worth learning stuff (Practical aspect at least) that you won't ever use
so what do you recommend me focusing on?
like not worth learning C if all the work you're ever gonna do is in data science or smthn like that
If you're trying to learn how to program
Idts that much mostly python R SQL and ig java
not too sure
but that's beyond the point
if you're trying to learn programming from scratch
and you're getting into data science
it's probably smarter to start with Python
and then focusing more on data science stuff since that's what you're studying
ah ok
and not have to waste your time in things meaningless to you
ok thank u so much
Gave +1 rep to (Standard Deviation) Male#2029
do u think CS foundation would help me understand data science more?
what's cs foundation?
or can i just cope with what they give me
i mean like, basic logic of cs
ohh
you learn that
as you work on projects and stuff
idk if it's worth just trying to learn it without applying it at the same time
oo
Id say the best way
if you're a complete beginner
is to learn the syntax and basics like that of whatever language
and then work on a project
i mean i studied IT so i have javascript knowledge
javascript is great
so that should be somewhat enough to understand what's going on, although syntaxes and such would probably be different
it should make it quicker
i say just learn the syntax
and basics like that
then start working on projects immediately
hmm
well
depends
i think since you're doing data science
i have one idea but im also making turning it into a startup
i made it already
lemme think of something else
relevant to data science
you can do something that like
tracks price of real estate or something
i made something similar
it like holds the price for items in a grocery store
and the ratings
and updates it etcetc
but that uses sql too
oooh
that can be done with python?
yep
can u recommend me some websites or links that i can use to get started with?
with like tutorials orr?
- ChatGPT
and everything else
😭
how did u first start learning python?
it's basically google just much quicker it's cool af
I learnt the syntax
and then I was picked for a program in my country
which was for python
and there they gave us so many projects to do
and challenges and stuff like that
where did u learn it?
yeah true lol
youtube
oo
there's like those 5 hour tutorials or smthn
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
Click the ⚙️ to change to a dub track in Spanish, Arabic, or Portuguese.
Want more from Mike? He's starting a coding RPG/Bootcamp - https://simulator.dev/
⭐️ Contents ⭐
⌨️ (0:00) Intr...
does this work
lmao
Gave +1 rep to (Standard Deviation) Male#2029
sure
then once you're a bit more comfortable you can begin with like dsa and stuff
just make sure to be comfortable with stuff like lists arrays sets conditions loops operators and recursion
variables etcetc
for that though it's better if you try to find a college course online
MIT has their courseware
open for everyone
so you can check that out too
i recommend you do
yup yup
First 3 are right
Only reason you'd do other languages is if you're interested in mixing with compsci
A2 CS is somewhat useful if you wanna learn Classes and Polymorphism and etc
But if your school forces you to do it in Pascal or VBNET then don't even bother
what are those?
ah i see, ok thanks
Gave +1 rep to Oriole#1906
im done with a2 level cs i did programming in python. now i have uni in a couple months . is it better to learn python better to learn java to get a headstart in uni?
Help needed <@&597298407476035596>
I recommend you do wtv your university teaches first year
I heard they do java mostly. But will learning the concepts in python help in java or should i just learn everything again in java
Basically when doing CS in A levels you have the option of 3 programming languages- Python, Pascal and VB.NET
Python is great
The other 2 are outdated and there's no point learning them
i think concept-wise the ideas will be similar
so I recommend you do Java instead
as it will help reduce your workload when the semester starts
If your uni starts with Java, you should learn Java in your free time before that
Because while concepts are similar, Object Oriented Programming is very deeply implemented
And it's difficult to wrap your head around if your only experience is python
In Java, everything is a Class
print("Hello, World!") #python
vs
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
#Java
don't you guys have diff course for oop
ours
the one which introduces java
is different
and one which
teaches oop is different
So we have an Introduction to Programming unit that's taught in Python that does OOP in the last few weeks
Then we have Object Oriented Programming that's taught in Java
ooooh
Yep
for us
for freshmen there's 2
one if you never programmed before which is in Java
the other if you did
but both are like
basic stuff
then higher level courses have more oop
Then there's Data Structures and Algorithms which is more of a thinking unit and less of a coding one
Right
By the end of this unit, you have to implement a game
no for us dsa is in a different course
And then we have Systems Programming which is taught in C
that class is cool as shit
Yeah so for us, the first 2 are 1st year CS courses/subjects/units (whatever it's called)
And the next 2 are 2nd year CS courses
you learn alot by making an OS
It's fucking terrifying at our uni
I'm so lucky I'm a Data Sci major and don't have to do that course
it is but I mean like
most of my seniors
who I talked to
it's a recurring theme
that they say it's one of the most useful classes
Yeah it's supposed to be insanely useful
But most people expect to fail it at least once at my uni
fair enough😭
I think 120 people got 0 in the 3rd assignment this semester
HOLY SHIT
nah for me
my grades are quite good
so far at least
hope to keep it this way😭
I learnt a bit about quantum computing this year and it was really cool
but not in class
i wanna take it in few years
once I can
quantum computing is so cool
Yep it iss
I have no idea what it is but ik it's cool
the one they have for freshmen is just like
a dumbass seminar
meant mostly for arts and business students
you should look into it it's mind-blowing
like basically
the computer can carry multiple calculations at once
rather than just one as opposed to rn
It's also actually just really hard for us to get good scores in like most Aussie unis, it's basically impossible to get 85, and 75 is a fuckton of hard work that most people don't have the time for.
I have a 65 average overall rn, and that's gonna be destroyed this semester
Ahhh damn
cause it isn't like binary but states of electrons that carry the info, and that could basically be infinite
Makes sense
yeah I noticed that too
or i mean
heard
ahh alright thanks
Hallo childs
Hallo father
@tough frost @pulsar pecan hello 👴
@tough frost Plural for child is children. There's no point in saying that since dis a cs channel not eng
Would you like to play #ug-computer-science go with me?
What is this?
first
What is undergrad Computer Science?
A channel for people who'll study Computer Science at Undergrad Level. E.g. Karthik and I
Ohh ok
I want to do this in my UG and maybe PG too
Because I hate the S from the CS
take the D then
@feral gyro can u tell me it's full form

😂
@slate stone what does it mean
wait you're learning UG CS ? @slate stone
no clue what this eq means
is it a vector eq
oh damn
you're making an arduino project
@slate stone
I have made a bluetooth speaker
Unfortunately, no programming though
bruh you on another level
great job
what are you trynna make though
VR Porn
Hey guys. I'm about to enter year 1 and I'm pretty lost on what to prepare myself for
@earnest basin start with python chief
hey guys, which subjects did yall give for SATs for CS?
since chem is out of the loop,,, there is math, phy and?
@fast igloo doesn't really matter, Math and physics is enough. but if you have an interest in any other subject or a language (or even American history), go for it. Two is usually enough unless your Uni has specific requirements (like for example, Cornell has specific subject test requirements)
@shell wedge alright thanks!
“the heading of the document should be placed in border with shadow”
What does that mean?
How do we do that in ms word?
Can anyone please help me with that^?
@median night Sattish's is the 2019 i guess
see
😒
Who u saying that to
u ask her
It's for whoever that needs luck
Aight, @slate stone hope that answers your question
wait if u got MS wword questions... ask me i got more than 70 percentile according to LinkedIn test 😂
Oh, I see
Thank you! @jolly bronze
👌
@slate stone sigh your pfp always makes my day
Can anyone please help me?
How can we highlight a word using style?
@slate stone still need help?
so in ms word right?
Yes
so the yellow highlight rightttt
the only way you can highlight is putting a shadding over so like this
hope that helps
No, I wanna highlight the text using style
aight wait
sorry bro but that i dont know how to do
best thing i can tell you is maybe go throught google
or the microsoft word community
they must have talked about it
Alright, thanks!
👌🏼
@vital grail you might want to approach to #programming for a better response regarding your programming queries.
Does anyone have some good resources for Linear Algebra?
Yupp
This best-selling textbook for a second course in linear algebra is aimed at undergrad math majors and graduate students. The novel approach taken here banishes determinants to the end of the book. Th
A bit abstract
You can try Strang if you're looking at applications
Ooo, this really must be a hella good book.
Someone else I asked about learning linear algebra also recommended the same book
Thanks!
Pog
@pulsar pecan sorry for tagging any books for determinants or like programming
Determinants as in lin alg?
Programming idk mate I've always learnt from the internet or courses, I've heard that Donald Knuth's "Art of programming" series is good but might be heavy at the starting but do check it out
For basic calc hmmm
Lemme think
ahh coool
don't use books for programming @slate grove
what is the difference between computer science and computer engineering?
and which one is more evolving in today's time (taking in consideration the movement of fields in the next say 5-7 years)
is UI UX a good math
path*
I know graphic design atm, In As. Would take a UI UX major in Uni be good and financially good?
from what I know CS engineering focuses more on hardware but I'm not in the US so it might be different there
ah thanks
Hey, does anyone know what career paths I could go into with AS/A level chemistry, ict and math?
Is it best to start learning Discrete Maths before I start uni this semester? Or should I start with the programming language such as C++?
You could do bits of both imo
@slate stone I saw your message
Gimme a sec
Check out the slides here
This is what I'm using
Thanks !!
znask set "CS Helper"
I didn't know where to post this but uhhh
someone asked this on piazza and I honestly don't know the answer lol
Anyone know how to get back to win 10 from win 11 without data loss currently in latest update
There's a rollback period of 10 days, if you're over 10 days in windows 11 you can't, are you?
M in latest update
It lags my laptop
How long have you had win 11 for
Since win 11 came😁
Yeah you can't revert without a full reset
I know but i need soln witohut full reset
Backup, reset, load backup?
The rollback period is only 10 days iirc
After that you can't revert without data loss
Dont have Backup budget too😹
Enjoy windows 11 buddh
Thanks
get like a 128GB usb or something
and move all your required files onto that
and then reset lol
i dont think 128GB usbs are too expensive
Thanks for ur advice
Should've googled the error code xD
Thanks
Help needed by @wraith lynx | <@&597298407476035596>
wait... it didn't parse my text.
well, i''m having a machine project due in 5 days in which part of it would involve the use of 2 hashing functions to search for the frequency of a pattern of size k in a string. the language that i'll use is c/c++.
what hashing functions would you guys recommend?
Is pursuing CS degree worth these days for future??
Yes
CS is one of the major fields that will be relevant in the future and have a ton of opportunities
@steel creek
U sure man
CS is only theory or ??
Thanks
You're welcome
does anyone want to study computer programming together?
i need help converting the md5 and sha-1 hashing functions into a function that can do the assigned task in java:
Help needed by @wraith lynx | <@&597298407476035596>
and i could not do it
should net neutrality be restored? and why?
Anyone here have experience with MongoDB and C#?
What math would I be taught in undergraduate computer science?
Are you still looking for a study buddy?
F
you just gave me so much Flash Games nostalgia, ik what im making next now
can you do my assignment for me 🥺
im jk
im not learning java bro
i feel like i can do whatever I want in py and c++
and all I hear about java and JS is pain
This is true
I heard that C++ is also a massive pain
I might do it next year
Hi, I'm about to finish grade 12 and am wondering how I should prepare for a bachelor's degree in computer science. Anyone got any tips, resources or anything I should look out for?
Following
Grade 12 :- A level complete?
i have a question
in the game im making, i want to be able to take a keypress action, but only implement the keypress every 10 frames
so for example: if at frame 1, the user presses the left key to move the character left- it should wait till frame 10, and only then move the character left
can someone help me with the logic for this
Help needed <@&597298407476035596>
@lucid garnet ik you dont have the CS helper role but any ideas🥺 (sorry for ping)


oof ok my bad
We don't have keypress stuff I believe
hm nws
😂
You could set a boolean for whether the key is pressed, and in whatever tick/frame update method, you can increment a counter if the key is still pressed and reset to 0 if the key is no longer pressed.
this is the game im implementing btw
but this wouldnt make the character turn left if the left key was released right?
true, I suppose you could store a queue of inputs with the delay until you execute it
so something like Left Key Pressed -> add (Left, 10) to the queue
and on the update ticket, it goes through the whole queue and decrements each delay by 1, and if it equals 0, then we set the current direction to that direction
thank you so much
Gave +1 rep to scythetwirler#5510
Hello i was asked to do a project about a villa rental system, i just have to write the business rule and draw the entity relationship diagram , but the thing is that I have never been to a villa before and i can't see anything about it on the net, can you people help me please
/ask
:(
Help needed <@&597298407476035596>
I need to get at least 7 entities
hello, just finished my A levels. would anyone give me tips on what to do this summer to prepare?👀
Help needed <@&597298407476035596>
int main()
{
int num = 4,i,y,x = 30;
for(y=1; y<=num; y++)
{
goto(x,y+1);
}
for(i=0; i<=y; i++)
{
pritnf(“%3d”,abs(i));
x = x-3;
}
}```
can anyone tell me what wrong in this code and how to fix it?
Is there an error when you run it
Is this Java or JavaScript
it is c
Lmfao it looked close to Java syntax so I was wondering
Never done C before
yes it shows error at goto part
says: expected identifier or * before (
I think you're only supposed to goto to a label
Use proper discord formatting reeee
Example product:
#include<stdio.h>
int main()
{
int num = 4,i,y,x = 30;
for(y=1; y<=num; y++)
{
goto(x,y+1);
}
for(i=0; i<=y; i++)
{
pritnf(“%3d”,abs(i));
x = x-3;
}
}
Ok now why is it not formatting C properly me angy
Prob bc i dont know the actual C language thingy that discord considers as C but ok
Ok i think its just me being on mobile thats why its not showing idk
But it should have cool colours like ur IDE
Me thinking same


