The Student Room Group

OCR Computing Coursework Algorithm help

So im stuck on creating an algorithm for my task 1 which is about the Caesar Cyper.
Original post by ZS1
So im stuck on creating an algorithm for my task 1 which is about the Caesar Cyper.


in what specific thing you are stuck on?
did you made a start?
Hiya?
What is Task 1 about?
Try To give more detail about the scenario and what you have to do?
Reply 3
Original post by 15anonymous15
Hiya?
What is Task 1 about?
Try To give more detail about the scenario and what you have to do?


I have to create an algorithm about a Casar Cipher
Reply 5
Create an array of 26 characters letters a-z

Create an getEncrypterdChar function.

This functions finds the index of a given character in the array and adds 13 to it.
It then checks if the index is greater than 26 and if so subtracts 26.
It then fetches the character at that index from the array.

In your main program read in the user input to be encrypted.
Loop over each character using a for loop passing the character to getEncrypted and printing out the result.

To decrypt encrypted text just do the same thing. This is a Caesar cypher called rot13
(edited 8 years ago)
Reply 6
What language do you have to use to do this? I'm happy to help using python.
Reply 7
Original post by ZS1
So im stuck on creating an algorithm for my task 1 which is about the Caesar Cyper.


Original post by peterxz
What language do you have to use to do this? I'm happy to help using python.
.

Yeah python mate
Reply 8
Original post by ZS1
.

Yeah python mate


What exactly are you stuck with? Have you tried coding anything at all yet?
Reply 9
Original post by peterxz
What exactly are you stuck with? Have you tried coding anything at all yet?


Just the algorithm . my code's working perfectly

Quick Reply

Latest

Trending

Trending