EchoesAct3
Badges: 5
Rep:
?
#1
Report Thread starter 1 month ago
#1
So I do a computer science and just started. My teacher told us to do a programming homework (that requires you to know a programming language). I haven't been taught anything about programming. Was I supposed to learn all these languages before I started the course? And how else am I supposed to do the homework without me copying someone else's program. The homework was about encrypting and decrypting a caesar cypher.
0
reply
justanotherkayx
Badges: 8
Rep:
?
#2
Report 1 month ago
#2
do you have to program a caesar cypher or just do it by hand?
0
reply
AcseI
Badges: 18
Rep:
?
#3
Report 1 month ago
#3
(Original post by EchoesAct3)
So I do a computer science and just started. My teacher told us to do a programming homework (that requires you to know a programming language). I haven't been taught anything about programming. Was I supposed to learn all these languages before I started the course? And how else am I supposed to do the homework without me copying someone else's program. The homework was about encrypting and decrypting a caesar cypher.
So we can't possibly answer questions about what your teacher expects you to know, whether you were supposed to learn things beforehand, etc. You'll have to ask your course leader for that.

In terms of the problem at hand, it's unclear what you need to do. Are you expected to write your own program? Are you just expected to solve the cipher, and programming is one method that was recommended?

At it's core, the problem seems like it can be broken into two parts. Understanding the Caesar cipher, and coming up with a solution for the homework. Understanding the cipher itself shouldn't present any problems, a Caesar cipher is quite possibly the simplest example available and it shouldn't take you more than a few minutes of Googling / reading to understand how it works. You could then solve a decrypt a ciphertext by hand, or using an online tool without any trouble.

If you do need to solve this programatically, then you may have to get studying. Learning to write code in Python will be a good starting point, although functionally speaking your code doesn't need to do an awful lot. For a string of text it'll be a matter of iterating over each character and performing the encryption / decryption process. If you get stuck, finding out how to reference individual characters in a string (by index), how to loop over each character in a string, how to reference a letter using a numerical value (think ASCII values for example) and how to wraparound when you get to the end of the alphabet (the modulus operation is useful here) should get you going. This might sound daunting, but it's a fairly trivial process even with no experience and sounds worse than it is. If you really struggle, look for examples of code, read through and understand how it works.
0
reply
EchoesAct3
Badges: 5
Rep:
?
#4
Report Thread starter 1 month ago
#4
(Original post by justanotherkayx)
do you have to program a caesar cypher or just do it by hand?
Make a program that encrypts and decrypts a caesar cypher.
0
reply
EchoesAct3
Badges: 5
Rep:
?
#5
Report Thread starter 1 month ago
#5
(Original post by AcseI)
So we can't possibly answer questions about what your teacher expects you to know, whether you were supposed to learn things beforehand, etc. You'll have to ask your course leader for that.

In terms of the problem at hand, it's unclear what you need to do. Are you expected to write your own program? Are you just expected to solve the cipher, and programming is one method that was recommended?

At it's core, the problem seems like it can be broken into two parts. Understanding the Caesar cipher, and coming up with a solution for the homework. Understanding the cipher itself shouldn't present any problems, a Caesar cipher is quite possibly the simplest example available and it shouldn't take you more than a few minutes of Googling / reading to understand how it works. You could then solve a decrypt a ciphertext by hand, or using an online tool without any trouble.

If you do need to solve this programatically, then you may have to get studying. Learning to write code in Python will be a good starting point, although functionally speaking your code doesn't need to do an awful lot. For a string of text it'll be a matter of iterating over each character and performing the encryption / decryption process. If you get stuck, finding out how to reference individual characters in a string (by index), how to loop over each character in a string, how to reference a letter using a numerical value (think ASCII values for example) and how to wraparound when you get to the end of the alphabet (the modulus operation is useful here) should get you going. This might sound daunting, but it's a fairly trivial process even with no experience and sounds worse than it is. If you really struggle, look for examples of code, read through and understand how it works.
So I'll have no choice to learn a whole programming language from scratch to complete one simple piece of work. That sucks considering that I thought they'd teach me that instead. I didnt do alot of programming in secondary so I'm confused on how I should learn it. Shall I just watch one of those 5 hour tutorial videos?
0
reply
Bio 7
Badges: 21
Rep:
?
#6
Report 1 month ago
#6
(Original post by EchoesAct3)
So I'll have no choice to learn a whole programming language from scratch to complete one simple piece of work. That sucks considering that I thought they'd teach me that instead. I didnt do alot of programming in secondary so I'm confused on how I should learn it. Shall I just watch one of those 5 hour tutorial videos?
That’s uni, you don’t get spoon-fed and have to do a lot of learning on your own.
0
reply
AcseI
Badges: 18
Rep:
?
#7
Report 1 month ago
#7
(Original post by EchoesAct3)
So I'll have no choice to learn a whole programming language from scratch to complete one simple piece of work. That sucks considering that I thought they'd teach me that instead. I didnt do alot of programming in secondary so I'm confused on how I should learn it. Shall I just watch one of those 5 hour tutorial videos?
Assuming that's what you've been asked to do, yes to an extent. However you hardly need to learn an entire language from scratch. This program is not going to be particularly complex, so you won't need to know a ton to get it working.

I do agree that it's a little unusual for them to expect you to write code without giving any formal teaching on it first though. If prior knowledge were required you'd have been aware of that, and if no prior knowledge is expected then typically you'd be taught from scratch. So I can understand your frustration. It's probably worth reaching out to your lecturer and asking their advice, you probably aren't the only person in this situation. It's also fairly likely that if you're being asked to do this now, you'll no doubt be asked to write more complex programs later on. The sooner you start, the quicker you'll get to a point where you won't struggle.

In terms of how to learn, that's up to you. You could find a free online course, you could watch YouTube videos, you could buy a book, etc. Even if you didn't do a lot of programming in secondary school you probably have some foundational understanding for things like variables, loops, functions, etc. so you won't be starting completely from scratch. I'm also happy to point you in the right direction if you put in the effort yourself. For example you've done a little bit of programming and can do a quick Google to understand a Caesar Cipher. What do you know about how to write this program and what do you need to go and learn more about?
0
reply
davros
  • Study Helper
Badges: 16
Rep:
?
#8
Report 1 month ago
#8
(Original post by EchoesAct3)
So I'll have no choice to learn a whole programming language from scratch to complete one simple piece of work. That sucks considering that I thought they'd teach me that instead. I didnt do alot of programming in secondary so I'm confused on how I should learn it. Shall I just watch one of those 5 hour tutorial videos?
What level are you working at? Have you just started a uni course having come from a school environment?

Were there any pre-requisites for the course in terms of programming knowledge? Did they give you any reading lists over the summer or ask you to complete any tasks in advance of joining the course?

As the previous poster said, I'd be very surprised if they just dropped you into a programming task without having already provided you with some programming material or made it clear in advance that you would be expected to know it!
1
reply
Rufus the red
Badges: 17
Rep:
?
#9
Report 1 month ago
#9
I'd recommend finding a piece of code for a caeser cipher and finding out how it works as I find it easier to reverse engineer code if I don't know how to do something.
And I don't mean copy. I mean find some finished code and make something similar that you are comfortable with.
0
reply
EchoesAct3
Badges: 5
Rep:
?
#10
Report Thread starter 1 month ago
#10
(Original post by Bio 7)
That’s uni, you don’t get spoon-fed and have to do a lot of learning on your own.
Sorry I shouldve mentioned that I was doing an a level not a course at uni. Sorry.
Last edited by EchoesAct3; 1 month ago
0
reply
EchoesAct3
Badges: 5
Rep:
?
#11
Report Thread starter 1 month ago
#11
T8

(Original post by AcseI)
Assuming that's what you've been asked to do, yes to an extent. However you hardly need to learn an entire language from scratch. This program is not going to be particularly complex, so you won't need to know a ton to get it working.

I do agree that it's a little unusual for them to expect you to write code without giving any formal teaching on it first though. If prior knowledge were required you'd have been aware of that, and if no prior knowledge is expected then typically you'd be taught from scratch. So I can understand your frustration. It's probably worth reaching out to your lecturer and asking their advice, you probably aren't the only person in this situation. It's also fairly likely that if you're being asked to do this now, you'll no doubt be asked to write more complex programs later on. The sooner you start, the quicker you'll get to a point where you won't struggle.

In terms of how to learn, that's up to you. You could find a free online course, you could watch YouTube videos, you could buy a book, etc. Even if you didn't do a lot of programming in secondary school you probably have some foundational understanding for things like variables, loops, functions, etc. so you won't be starting completely from scratch. I'm also happy to point you in the right direction if you put in the effort yourself. For example you've done a little bit of programming and can do a quick Google to understand a Caesar Cipher. What do you know about how to write this program and what do you need to go and learn more about?
I found out what a caesar cipher is and understand very well. As for the programming part I'm not so sure. I haven't taught myself any specific language so my knowledge of it all is pretty much bad. I'll just try to teach myself from scratch. I didnt do computer science in secondary so I guess I'll have to start from the very beginning.
0
reply
EchoesAct3
Badges: 5
Rep:
?
#12
Report Thread starter 1 month ago
#12
(Original post by davros)
What level are you working at? Have you just started a uni course having come from a school environment?

Were there any pre-requisites for the course in terms of programming knowledge? Did they give you any reading lists over the summer or ask you to complete any tasks in advance of joining the course?

As the previous poster said, I'd be very surprised if they just dropped you into a programming task without having already provided you with some programming material or made it clear in advance that you would be expected to know it!
I've just started A levels and they didnt mention anything about knowing a programming language. Just a 7 in maths.
0
reply
EchoesAct3
Badges: 5
Rep:
?
#13
Report Thread starter 1 month ago
#13
(Original post by Rufus the red)
I'd recommend finding a piece of code for a caeser cipher and finding out how it works as I find it easier to reverse engineer code if I don't know how to do something.
And I don't mean copy. I mean find some finished code and make something similar that you are comfortable with.
I'm pretty sure I'll get confused so I'd just stick to learning a language from scratch preferably python.
0
reply
AcseI
Badges: 18
Rep:
?
#14
Report 1 month ago
#14
(Original post by EchoesAct3)
I found out what a caesar cipher is and understand very well. As for the programming part I'm not so sure. I haven't taught myself any specific language so my knowledge of it all is pretty much bad. I'll just try to teach myself from scratch. I didnt do computer science in secondary so I guess I'll have to start from the very beginning.
That, coupled with only being an A Level, makes it even more unusual that you'd just be told to do some programming with absolutely no prior learning. Definitely raise this with your tutor, this project isn't super difficult but it's not really suitable either. Definitely explain that you have no prior experience, ask where you're supposed to start, etc.

For the programming part, even if you don't know what code to write, do you have a rough idea of what the code needs to do? So for example could you describe the process involved? If so, you'll probably be able to get most of the way there with just a little introductory material covering variables and loops.
0
reply
Rufus the red
Badges: 17
Rep:
?
#15
Report 1 month ago
#15
(Original post by EchoesAct3)
I'm pretty sure I'll get confused so I'd just stick to learning a language from scratch preferably python.
Fair enough and, yes, python is probably your best bet.
1
reply
justanotherkayx
Badges: 8
Rep:
?
#16
Report 1 month ago
#16
(Original post by EchoesAct3)
Make a program that encrypts and decrypts a caesar cypher.
Hey, so if you haven't done any programming languages yet maybe they expect you to write it in pseudocode which is basically just describing in words /plain language the steps of the algorithm (look it up and see some examples!) . If that's the case just research what a caesar cypher is and I think it would be really easy to just write some pseudocode. If they do expect you to code it, I really recommend the website Codecademy for good beginner-level coding lessons it's helped me out so much! Like others, I'd recommend python too. Hope that's helpful!
Last edited by justanotherkayx; 1 month ago
2
reply
EchoesAct3
Badges: 5
Rep:
?
#17
Report Thread starter 1 month ago
#17
(Original post by AcseI)
That, coupled with only being an A Level, makes it even more unusual that you'd just be told to do some programming with absolutely no prior learning. Definitely raise this with your tutor, this project isn't super difficult but it's not really suitable either. Definitely explain that you have no prior experience, ask where you're supposed to start, etc.

For the programming part, even if you don't know what code to write, do you have a rough idea of what the code needs to do? So for example could you describe the process involved? If so, you'll probably be able to get most of the way there with just a little introductory material covering variables and loops.
No I have no idea. I'll get there eventually. Thanks though.
0
reply
AcseI
Badges: 18
Rep:
?
#18
Report 1 month ago
#18
(Original post by EchoesAct3)
No I have no idea. I'll get there eventually. Thanks though.
If you're unable to roughly describe how the code would work, then you may want to revisit the Caesar Cipher. If you can explain how you would solve a Caesar Cipher, that's the starting point for what you want your code to do. At it's most basic, fill in the blanks below:

The code will take ____________ as input, do ______________ to that input, then ouput _____________.

You can then work through those stages. For example you'd need somewhere to store the input (a variable), some way to output the result (a print statement) and whatever logic goes in the middle for the encryption/decryption process. This central logic will be the most complex part, but I think everything you'll need to know is mentioned in this thread. Good luck!!
1
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Current uni students - are you thinking of dropping out of university?

Yes, I'm seriously considering dropping out (170)
14.57%
I'm not sure (54)
4.63%
No, I'm going to stick it out for now (343)
29.39%
I have already dropped out (35)
3%
I'm not a current university student (565)
48.41%

Watched Threads

View All