Pseudocode Pro
Pseudocode Pro
  • Видео 115
  • Просмотров 14 346
A-Level 9618 Exam: Header & FindModules - May/Jun 2024 Paper 23 | Question 8
Creating a function to take a line of code, then determine whether it is a function or procedure header and returning this is a given format. Then creating a procedure to find all the modules in a specified file and adding these module details to a global array
Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications
Cambridge Pseudocode Executor: pseudocode.pro
Cambridge Assembly Executor: asmcode.pro
Просмотров: 7

Видео

A-Level 9618 Exam: Progress - May/Jun 2024 Paper 23 | Question 6
Просмотров 32 часа назад
Creating a procedure to generate a filename based on the range a given progress integer falls into div, string Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: pseudocode.pro Cambridge Assembly Executor: asmcode.pro
A-Level 9618 Exam: TwoParts - May/Jun 2024 Paper 23 | Question 4
Просмотров 22 часа назад
Calculating the total of all input numbers until a first zero, then calculating all a 2nd total for all the inputs up until the next zero. Finding and outputting the average of these totals global variable, loop, iteration, repeat until Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: p...
[Solved Paper] May/June 2024 Paper 23 A-Level 9618
Просмотров 214 часа назад
A full walkthrough with explanations to paper 23 of the May/June 2024 9618 Cambridge computer science paper 00:27 Question 1: algorithm, data, module, procedure, function, complexity, reusability, parameter, argument, return value, by reference, global variable, maintenance, corrective, adaptive, perfective, assignment, MID, DAY, IS_NUM, MOD 10:33 Question 2: 1D array, global, text file, file h...
A-Level 9618 Exam: DeleteSpaces & Stage_2 - May/Jun 2024 Paper 22 | Question 8
Просмотров 34 часа назад
Creating a function to remove leading spaces from a string, then looping through a file, removing all leading spaces and comments then appending these non-blank lines to an existing file Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: pseudocode.pro Cambridge Assembly Executor: asmcode...
A-Level 9618 Exam: Trim - May/Jun 2024 Paper 22 | Question 6
Просмотров 54 часа назад
Going over two solutions to solve this question - music titles have to be trimmed to 16 characters or less with the first overflowing word being replaced with ellipses Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: pseudocode.pro Cambridge Assembly Executor: asmcode.pro
A-Level 9618 Exam: IsRA (right-angled) - May/Jun 2024 Paper 22 | Question 4
Просмотров 14 часа назад
The 2nd question in this series about determining whether a triangle is right-angled or not - this time, the user inputs 3 side lengths, then Pythagoras is used to determine if a triangle is right-angled or not Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: pseudocode.pro Cambridge As...
[Solved Paper] May/June 2024 Paper 22 A-Level 9618
Просмотров 357 часов назад
A full walkthrough with explanations to paper 22 of the May/June 2024 9618 Cambridge computer science paper 00:24 Question 1: pseudocode, functions, modules, operators, selection, IF, CASE, iteration, FOR, REPEAT UNTIL, WHILE, loops, INPUT, OUTPUT, assignment, variable, CHAR, INTEGER, STRING, file-handling, program development lifecycle, analysis, requirements gathering, feasibility analysis, d...
A-Level 9618 Exam: DeleteComment & Stage_1 - May/Jun 2024 Paper 21 | Question 8
Просмотров 77 часов назад
Create a function to remove comments from a line/string and another to create a file, copying the contents of an existing file with the comments removed then return the number of comments written to this new file Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: pseudocode.pro Cambridge ...
A-Level 9618 Exam: IsRA (right-angled) - May/Jun 2024 Paper 21 | Question 6
Просмотров 47 часов назад
Using the Pythagorean Theorem to check if 3 points of co-ordinates for a right-angled triangle Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: pseudocode.pro Cambridge Assembly Executor: asmcode.pro
A-Level 9618 Exam: Check - May/Jun 2024 Paper 21 | Question 4
Просмотров 117 часов назад
Adding all the elements at the odd vs even indexes in an array and seeing which total is greater, or if they're the same Note: syntax used in the videos and the following websites follows the Cambridge IGCSE (0478) and A-Level (9618) qualifications Cambridge Pseudocode Executor: pseudocode.pro Cambridge Assembly Executor: asmcode.pro
[Solved Paper] May/June 2024 Paper 21 A-Level 9618
Просмотров 557 часов назад
A full walkthrough with explanations to paper 21 of the May/June 2024 9618 Cambridge computer science paper 00:23 Question 1: pseudocode, algorithm, assignment, statement, data type, string, integer, real, char, expression, identifier, comments, indentation, modules, procedures, functions 13:56 Question 2: flowchart, input, output, selection, process, string, parse 23:20 Question 3: abstract da...
[Solved Paper] May/June 2024 Paper 13 A-Level 9618
Просмотров 1919 часов назад
A full walkthrough with explanations to paper 13 of the May/June 2024 9618 Cambridge computer science paper 00:29 Question 1: kibibyte, binary, byte, megabyte, denary, terabytes, hexadecimal, overflow, binary addition, character sets, ASCII, extended ASCII, Unicode, string 08:31 Question 2: bitmap, image resolution, pixel, bit depth, colour depth, compression, lossy, lossless, upload, web serve...
[Solved Paper] May/June 2024 Paper 12 A-Level 9618
Просмотров 8421 час назад
A full walkthrough with explanations to paper 12 of the May/June 2024 9618 Cambridge computer science paper 00:31 Question 1: logic gates, NAND, NOR, XOR, OR, operation, logic expression, logic circuit, Boolean 04:27 Question 2: virtual reality, VR, hardware, screen, lense, speakers, sound, sensor, accelerometer, gyroscope, microprocessor, rotation, data, transmission, digital camera, buffer, c...
[Solved Paper] May/June 2024 Paper 11 A-Level 9618
Просмотров 115День назад
A full walkthrough with explanations to paper 11 of the May/June 2024 9618 Cambridge computer science paper 00:43 Question 1: logic expression, sum of products, evaluate logic expression, Boolean logic, NOR, XOR, AND, NOT, OR, truth table, logic circuit 10:12 Question 2: motion sensor, digital camera, embedded system, specific purpose, input/output, primary memory, secondary storage, processor,...
[15 Marker] IGCSE 0478 / O-Level 2210 - Football League | May/June 2024 Paper 23
Просмотров 5421 день назад
[15 Marker] IGCSE 0478 / O-Level 2210 - Football League | May/June 2024 Paper 23
[15 Marker] IGCSE 0478 / O-Level 2210 - Game Grid | May/June 2024 Paper 22
Просмотров 10121 день назад
[15 Marker] IGCSE 0478 / O-Level 2210 - Game Grid | May/June 2024 Paper 22
[15 Marker] IGCSE 0478 / O-Level 2210 - Cricket Clubs | May/June 2024 Paper 21
Просмотров 8221 день назад
[15 Marker] IGCSE 0478 / O-Level 2210 - Cricket Clubs | May/June 2024 Paper 21
[Solved Paper] May/June 2024 Paper 23 IGCSE 0478 | O-Level 2210
Просмотров 7621 день назад
[Solved Paper] May/June 2024 Paper 23 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2024 Paper 22 IGCSE 0478 | O-Level 2210
Просмотров 19521 день назад
[Solved Paper] May/June 2024 Paper 22 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2024 Paper 21 IGCSE 0478 | O-Level 2210
Просмотров 18621 день назад
[Solved Paper] May/June 2024 Paper 21 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2024 Paper 13 IGCSE 0478 | O-Level 2210
Просмотров 3621 день назад
[Solved Paper] May/June 2024 Paper 13 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2024 Paper 12 IGCSE 0478 | O-Level 2210
Просмотров 6821 день назад
[Solved Paper] May/June 2024 Paper 12 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2024 Paper 11 IGCSE 0478 | O-Level 2210
Просмотров 12421 день назад
[Solved Paper] May/June 2024 Paper 11 IGCSE 0478 | O-Level 2210
[Solved Paper] Specimen Paper 1A IGCSE 0478 | O-Level 2210
Просмотров 322 месяца назад
[Solved Paper] Specimen Paper 1A IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2023 Paper 23 IGCSE 0478 | O-Level 2210
Просмотров 492 месяца назад
[Solved Paper] May/June 2023 Paper 23 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2023 Paper 22 IGCSE 0478 | O-Level 2210
Просмотров 252 месяца назад
[Solved Paper] May/June 2023 Paper 22 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2023 Paper 21 IGCSE 0478 | O-Level 2210
Просмотров 252 месяца назад
[Solved Paper] May/June 2023 Paper 21 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2023 Paper 13 IGCSE 0478 | O-Level 2210
Просмотров 152 месяца назад
[Solved Paper] May/June 2023 Paper 13 IGCSE 0478 | O-Level 2210
[Solved Paper] May/June 2023 Paper 12 IGCSE 0478 | O-Level 2210
Просмотров 192 месяца назад
[Solved Paper] May/June 2023 Paper 12 IGCSE 0478 | O-Level 2210

Комментарии

  • @BoredSchizo
    @BoredSchizo 3 дня назад

    bro can u post paper 23 aswell really need a video for it 🙏

    • @PseudocodePro
      @PseudocodePro 3 дня назад

      Yeah I will upload all of them...p22 today, 23 tomorrow

  • @realnuclearbomb
    @realnuclearbomb 9 дней назад

    THIS WAS SO HELPFUL OMG

    • @PseudocodePro
      @PseudocodePro 9 дней назад

      What do you think about the video length...it's too long or ok? And do you watch it sped up? I'm just curious if people actually sit through the whole video...or if most people get bored and turn off after 5 minutes lol

    • @julien_mu8733
      @julien_mu8733 23 часа назад

      @@PseudocodePronot long sir , when you explain for longer period , we can ( understand ) not only for the sake of watching , thank you for your work 🙏🏽 , may god bless you

    • @PseudocodePro
      @PseudocodePro 13 часов назад

      @@julien_mu8733 I'm glad it's useful then :)

  • @DEVDEN-k3p
    @DEVDEN-k3p 10 дней назад

    thank you it helped me very much!!!!!!!

  • @NuhaDoorhundur
    @NuhaDoorhundur 14 дней назад

    Thank you very much.But I noticed for the last question in the ms there is a tie check. Why didn't you use this also?

    • @PseudocodePro
      @PseudocodePro 14 дней назад

      They used 6 loops, but my solution just used 4 - I handled finding the max points inside the input loop, rather than creating another loop to do that. And then outputting the winners can be found just by looping through the whole array and outputting any teams who have a points score equal to the max points What they are doing with that TieIndex array is unnecessary and overly complex in my opinion - there are obviously multiple ways to solve the problem, so the answer doesn't have to be exactly the same as the mark scheme. In fact, in the past, there have been quite a few mark schemes with code that has various runtime or logic errors...so the ms just offers one solution, though there are of course others

  • @Nabilamunda
    @Nabilamunda 20 дней назад

    Heyyyy!! Thank u so much dude..

  • @kxrxsh
    @kxrxsh 22 дня назад

    Thank you so much sir❤ your channel is very helpful for my revision for the October November exams

    • @PseudocodePro
      @PseudocodePro 22 дня назад

      glad it's useful - and good luck for your exam :)

  • @chills5100
    @chills5100 22 дня назад

    Nice you have also uploaded A levels content.

  • @kxrxsh
    @kxrxsh 24 дня назад

    could you please do for paper 21

    • @PseudocodePro
      @PseudocodePro 24 дня назад

      just made that today - i will upload paper 13 and 21 tomorrow...and 22 & 23 the next day :)

    • @PseudocodePro
      @PseudocodePro 23 дня назад

      just uploaded: ruclips.net/video/ZfP_DKRrqvM/видео.html

  • @chills5100
    @chills5100 24 дня назад

    Oh I forgot to mention

    • @chills5100
      @chills5100 24 дня назад

      My result of IGCSE came and I got ---- in computer science you guess the grade and then I will comment on your comment for my grade.

    • @PseudocodePro
      @PseudocodePro 24 дня назад

      @@chills5100 Hmm, well the fact you are here means you seem happy with your grade...so I will guess an A?

    • @chills5100
      @chills5100 24 дня назад

      @@PseudocodePro yes

    • @PseudocodePro
      @PseudocodePro 24 дня назад

      @@chills5100 Good job! So will you do AS computer science too or not?

    • @chills5100
      @chills5100 24 дня назад

      @@PseudocodePro First when I went to As campus to register my subjects back in July I had picked maths/chemistry and computers but now I am thinking of either leaving computer science and adding chemistry or continuing computer science. I got A in both component of computer science so my programming is not weak but I feel some chapters of computer science o level to be hard one of those being software and second being learning how input and input devices work to a high detail.

  • @BenDover-tx4fg
    @BenDover-tx4fg Месяц назад

    Tysm

  • @SarimShaikh-s9d
    @SarimShaikh-s9d Месяц назад

    does the syntax work exactly according to what Cambridge Alevels require as i assume they are very particular about such stuff

    • @PseudocodePro
      @PseudocodePro 25 дней назад

      Yes, the site was developed based on the official Cambridge pseudocode guide (make sure you select the right syllabus option on the site - A Level or IGCSE/O-Level)

  • @Leo-xh3jp
    @Leo-xh3jp Месяц назад

    Can you explain and upload this one in a pseudocode?

    • @PseudocodePro
      @PseudocodePro 25 дней назад

      Do you mean upload the code? It's on my site: //stuff pre-defined by cambridge CONSTANT NumRows <-- 10 CONSTANT NumColumns <-- 20 DECLARE Evening : ARRAY[1:NumRows, 1:NumColumns] OF BOOLEAN FOR row <-- 1 TO NumRows FOR col <-- 1 TO NumColumns Evening[row, col] <-- FALSE NEXT col NEXT row //Your code here: CONSTANT TotalSeatsAvailable <-- 200 DECLARE MenuChoice, NumSeatsBooked, NumSeatsToBook, TotalSeats : INTEGER NumSeatsBooked <-- 0 FOR row <-- 1 TO NumRows FOR col <-- 1 TO NumColumns IF Evening[row, col] = TRUE THEN NumSeatsBooked <-- NumSeatsBooked + 1 ENDIF NEXT col NEXT row OUTPUT "" REPEAT OUTPUT "--- Theatre Booking App --- 1) Make Booking 2) Exit" INPUT MenuChoice IF MenuChoice = 1 THEN REPEAT OUTPUT "Enter number of seats to book:" INPUT NumSeatsToBook UNTIL NumSeatsToBook >= 1 AND NumSeatsToBook <= 4 IF NumSeatsBooked + NumSeatsToBook <= TotalSeatsAvailable THEN FOR seat <-- 1 TO NumSeatsToBook DECLARE seatRow, seatCol, seatNum : INTEGER seatNum <-- NumSeatsBooked + seat seatRow <-- DIV(seatNum - 1, NumColumns) + 1 seatCol <-- MOD(seatNum - 1, NumColumns) + 1 Evening[seatRow, seatCol] <-- TRUE OUTPUT "Booked Seat: row ", seatRow, ", col", seatCol NEXT seat NumSeatsBooked <-- NumSeatsBooked + NumSeatsToBook ELSE IF NumSeatsBooked = TotalSeatsAvailable THEN OUTPUT "House full" ELSE OUTPUT "Can't book ", NumSeatsToBook, " - only ", (TotalSeatsAvailable - NumSeatsBooked), " available" ENDIF ENDIF CALL ShowBookings() ENDIF UNTIL MenuChoice = 2 //extra procedure - not required for question, just makes it easy for us to visualise PROCEDURE ShowBookings() DECLARE line : STRING FOR row <-- 1 TO NumRows line <-- "" FOR col <-- 1 TO NumColumns IF Evening[row, col] = TRUE THEN line <-- line & '🟩' ELSE line <-- line & '⬛' ENDIF NEXT col OUTPUT line NEXT row ENDPROCEDURE

  • @aniketpdo5431
    @aniketpdo5431 Месяц назад

    nice vid

  • @saved_through_faith
    @saved_through_faith Месяц назад

    you're honestly amazing!

  • @saved_through_faith
    @saved_through_faith Месяц назад

    you're the best!

  • @saved_through_faith
    @saved_through_faith Месяц назад

    you're a GOAT for this sir. you're amazing!

  • @xagurate
    @xagurate 2 месяца назад

    your videos gonna help me alottt

  • @AtharAli-jv7wc
    @AtharAli-jv7wc 2 месяца назад

    For As or A2

  • @bondz734
    @bondz734 3 месяца назад

    thank you

  • @chills5100
    @chills5100 3 месяца назад

    Thanks my G your the real goat with your videos and support I gave my IGCSE computer science paper 2 with in time and was able to complete my 15 marks question. Please pray that I get A* in computer science .

    • @PseudocodePro
      @PseudocodePro 3 месяца назад

      I hope you got - let me know your result when you get it. Good luck!

    • @chills5100
      @chills5100 3 месяца назад

      @@PseudocodePro I will !

  • @noodle5983
    @noodle5983 4 месяца назад

    30 mins left in my exam and im otw to the exam centre 😂

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      good luck :)

    • @noodle5983
      @noodle5983 3 месяца назад

      @@PseudocodePro hey man thank you so much for your videos, I found it the day before my exam but still it helped me so much. more power to you 💪🙏

    • @GojoSaturoHonored1
      @GojoSaturoHonored1 20 дней назад

      Hey bro what grade did u get,I'm curious

    • @noodle5983
      @noodle5983 18 дней назад

      @@GojoSaturoHonored1 *

  • @AliAhmed-z4n
    @AliAhmed-z4n 4 месяца назад

    love the videos

  • @abdurrehmanfaisal
    @abdurrehmanfaisal 4 месяца назад

    what was div and mod thing

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      do you know what they do - DIV returns the number of times you can wholly divide a number by another...and MOD returns the remainder from that division e.g. if you have 10 slices of pizza and 3 people DIV(10, 3) = 3 - this is saying each person gets 3 slices of pizza MOD(10, 3) = 1 - this is saying there is one slice of pizza remaining

  • @minaamk9821
    @minaamk9821 4 месяца назад

    Hey I dont understand how the GetStart is returning a value in the second condition that you used, please explain!!

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Do you mean in the ELSE statement...or when calling GetStart(2)? All the code is uploaded as solutions on the specific exam question page on my site now - so you can easily test the code from these videos out there. Maybe it might help

  • @eneil_hualuo8159
    @eneil_hualuo8159 4 месяца назад

    cannot compare with this ruclips.net/video/dQw4w9WgXcQ/видео.html because yours is way too bad

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      You're right...nothing can compare to that But anyway, you're in A2...you can ignore SQL anyway

  • @TanusreeReddy-y2j
    @TanusreeReddy-y2j 4 месяца назад

    Super helpful thank you!

  • @oshiradake_k1430
    @oshiradake_k1430 4 месяца назад

    thank you so so so so muuuuuchhhh oh my gosh sir, you have no idea how helpful these are.. please solve full papers too please please please!!! Thank you so much

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Thanks - I work on the site daily, so don't have much time...but there are a number of other channels for past papers :)

  • @madacoro6099
    @madacoro6099 4 месяца назад

    My life is now saved! Thank you so much for the video I felt so hopeless in pseudocode before!!

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Glad it's useful - make sure to see if you can apply this knowledge then, by trying the 15 mark questions etc (I have the starter code on my site)

  • @peachcandie
    @peachcandie 4 месяца назад

    in line 55 you were supposed to write Area instead of RoomLength right?

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Yes, you are right...I said area, but forgot to change the variable after copying/pasting

  • @minaamk9821
    @minaamk9821 4 месяца назад

    Dude you are so underrated, i hope you get a million subscribers because you actually deserve it THE BEST PSEUDOCODE TEACHER!

  • @minaamk9821
    @minaamk9821 4 месяца назад

    I tried doing this with the REPEAT UNTIL LOOP but it only keeps giving the right answer, and if i enter invalid parameter such as 12 it shows an error can you pls check? OUTPUT FindBaseNumber(12) FUNCTION FindBaseNumber(Num:INTEGER) RETURNS INTEGER DECLARE Multiplynum, currentNum: INTEGER IF Num = 0 THEN RETURN 1 ENDIF Multiplynum <-- 1 currentNum <-- 1 REPEAT Multiplynum <-- Multiplynum + 1 currentNum <-- currentNum * Multiplynum UNTIL currentNum = Num IF currentNum = Num THEN RETURN Multiplynum ELSE RETURN -1 ENDIF ENDFUNCTION

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Just try adding an output inside the repeat until loop: REPEAT OUTPUT currentNum Multiplynum <-- Multiplynum + 1 currentNum <-- currentNum * Multiplynum UNTIL currentNum = Num Can you see the problem? See if you can fix it yourself...if not, I can tell you the answer...hint...you only need to add 1 extra character to make it work...

  • @minaamk9821
    @minaamk9821 4 месяца назад

    Can this be done with the REPEAT UNTIL loop?

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Yes - any FOR loop can be converted to either a pre or post-conditional loop

  • @minaamk9821
    @minaamk9821 4 месяца назад

    please don't stop making such great videos, they HELP me alot man!

  • @minaamk9821
    @minaamk9821 4 месяца назад

    I honestly can't thank you enough for this, you're probably the only RUclips Computer Science A level teacher who actually makes sense. THAKS A LOT FOR THIS! I hope your channel blows up! I'm sitting for my AS exams this May June and hope for the best!

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Thanks - and good luck for your exams too!

  • @Reddit_stories__2000
    @Reddit_stories__2000 4 месяца назад

    It was really helpful thanks

  • @moviesforyou6794
    @moviesforyou6794 4 месяца назад

    In function OnlyAlpha at 1:48, why have you taken curchar from 0 to 9? As they aren't included in the alphabetic character.

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      I mention that around 9:10...I copied the code from another question I did and didn't realise. Though I fixed it while making the video/for the website

  • @marlenemckinnon_77
    @marlenemckinnon_77 4 месяца назад

    How do you know data is from the text file?

    • @PseudocodePro
      @PseudocodePro 4 месяца назад

      Look at about 1:50 - the description of the SendFile procedure

  • @meow_rizz_8167
    @meow_rizz_8167 5 месяцев назад

    Really helpful, THANKS!!! By SUIIII

  • @EzzatFarid
    @EzzatFarid 5 месяцев назад

    i have a question, if you enter 63 for the linear search, won't it add 1 to the index which is already 1 so the index will be 2 because the program has to run the whole code before it checks the condition again?

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      Yes, the index would be 2 if you output/checked it after the loop. Remember, the loop will never run the 2nd time in this case, since FOUND = TRUE now after the assignment on line 20 When we output on line 19, the index is 1, which is what matters Alternatively, you could assign the Index <-- 0 instead of 1, then increment it on the first line of the loop, then the index number would be correct even after the loop. Does that make sense? I checked the mark scheme and for this question they just use a for loop which is strange, since even if you find the element in position 1, it will still keep looping for the other 49. If it's a function, a for loop is fine (and what I use for linear search) since you can just RETURN from the function which will terminate the loop when you find the value...but here, as it's not a function, there's no RETURN/BREAK statement to exit from the loop...hence why we need the flag

    • @EzzatFarid
      @EzzatFarid 5 месяцев назад

      @@PseudocodePro i dont understand what you mean we could use a function and for loop, also cant we use a break statement here? Also i dont understand what a flag is.

    • @EzzatFarid
      @EzzatFarid 5 месяцев назад

      also can you email me this paper thanks

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      ​@@EzzatFarid I show the FOR loop/function approach at 1:44:00 of this video (ruclips.net/video/QyFh14RVhZU/видео.htmlsi=-n6G3MK6gQfCro-K&t=6242) Unfortunately the Cambridge pseudocode syllabus doesn't include a break statement. A "flag" is a boolean variable used to indicate if a condition is true/false...in this case, you can use a "DidFind" flag and only loop WHILE DidFind = FALSE

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      @@EzzatFarid The links to all papers are here on the site pseudocode.pro/exam-questions Either click on the "qp"/"ms" links...or click on the question, then there are also links for the paper & mark schemes too

  • @legend_ms163
    @legend_ms163 5 месяцев назад

    Can you provide the source code ?

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      I did think about adding the source code for the answers on my site before...but then I worried that people would just copy the answers, rather than actually trying the questions themselves. If people do want to just copy the answer, I guess they can do that from the mark schemes, which I also have links for For this one, you're lucky...I just checked...and the source code autosave is here: CONSTANT ClassSize <-- 3 DECLARE StudentName : ARRAY[1:3] OF STRING DECLARE ScreenTime : ARRAY[1:3, 1:7] OF INTEGER StudentName <-- ["Rosa","Isabelle","Mateo"] // would be empty in the exam - this code is purely so you can easily test your code without having to input large amounts of values // ScreenTime <-- [ // [39,463,231,432,293,7,7], // [437,222,297,259,47,422,368], // [24,43,64,25,93,63,40] // ] //Your code here: // Write a program that meets these requirements: // • allows all the students to enter their daily minutes of screen times for the past week // • calculates the total number of minutes of screen time for each student in the week // • counts, for each student, the number of days with more than 300 minutes of screen time // • calculates the average weekly minutes of screen time for the whole class // • finds the student with the lowest weekly minutes of screen time // • outputs for each student: // - name // - total week’s screen time in hours and minutes // - number of days with more than 300 minutes of screen time // • outputs the average weekly minutes of screen time for the whole class // • outputs the name of the student with the lowest weekly screen time. DECLARE TotalMinsForStudent, TotalMinsForClass, NumDaysOver300Mins, LowestMins : INTEGER DECLARE LowestMinsName : STRING TotalMinsForClass <-- 0 FOR StudentNum <-- 1 TO ClassSize TotalMinsForStudent <-- 0 NumDaysOver300Mins <-- 0 FOR DayNum <-- 1 TO 7 OUTPUT "Enter screen time for student ", StudentNum, ", day ", DayNum INPUT ScreenTime[StudentNum, DayNum] TotalMinsForStudent <-- TotalMinsForStudent + ScreenTime[StudentNum, DayNum] IF ScreenTime[StudentNum, DayNum] > 300 THEN NumDaysOver300Mins <-- NumDaysOver300Mins + 1 ENDIF NEXT DayNum TotalMinsForClass <-- TotalMinsForClass + TotalMinsForStudent IF StudentNum = 1 THEN LowestMins <-- TotalMinsForStudent LowestMinsName <-- StudentName[StudentNum] ELSE IF TotalMinsForStudent < LowestMins THEN LowestMins <-- TotalMinsForStudent LowestMinsName <-- StudentName[StudentNum] ENDIF ENDIF OUTPUT StudentName[StudentNum], "'s Screen Time" OUTPUT DIV(TotalMinsForStudent, 60), " hours, ", MOD(TotalMinsForStudent, 60), " minutes" OUTPUT "Days over 300 minutes: ", NumDaysOver300Mins OUTPUT "" NEXT StudentNum OUTPUT "--------------" OUTPUT "Average Minutes for Class: ", TotalMinsForClass / ClassSize OUTPUT "Student with Lowest Screen Time: ", LowestMinsName

  • @EzzatFarid
    @EzzatFarid 5 месяцев назад

    for the search for stuff i did this in python: def SearchForStaffMember(Name): Found = False Counter = 0 while Found != True: if Counter < len(StaffName): if Name == StaffName[Counter]: Found = True else: Counter += 1 else: Counter +=1 if Found == True or Counter > len(StaffName): break if Found == True: print ("**** Staff Member Detials ***** 1) Name: ",Name," 2) Phone Number: ", StaffPhone[Counter], " 3 Office Number: ", StaffOffice[Counter]) else: print("Name not found within our records") i should have just used the for loop as it is much easier but i wanted to validate it to ensure that if they enter a name thats not in the staff list it returns a message saying its not in the records

    • @EzzatFarid
      @EzzatFarid 5 месяцев назад

      Also, Thanks a lot for these videos, they are really helpful.

    • @EzzatFarid
      @EzzatFarid 5 месяцев назад

      in the update procedure, do we really need to update the users name cuz its very unlikely that they would change their name

  • @morelisnsld
    @morelisnsld 5 месяцев назад

    Thanks so much I finally understood what the x in the for loop is for whenever I told ppl I don't understand for loops they would explain the whole thing and never that x is a variable that can be changed to n or z or whatever u want it to

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      Exactly. Glad it makes sense now :)

  • @PseudocodePro
    @PseudocodePro 5 месяцев назад

    In the exam, remember to add comments too...I forgot here...

  • @captainparry373
    @captainparry373 5 месяцев назад

    thank u so much for this im the one from discord

  • @EzzatFarid
    @EzzatFarid 5 месяцев назад

    can we use any type of loop for the maximum number of contacts that can be added at once, i have been trying all types of loops but it doesn't seem to work i just wantedto make sure that its impossible to use a loop here

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      Yes, you should be able to use a WHILE...ENDWHILE or REPEAT UNTIL loop...just make sure you have some index/count variable and you increment it For example, if you want to loop 10 times, you'd have DECLARE count : INTEGER count <-- 0 REPEAT count <-- count + 1 OUTPUT count UNTIL count = 10 See if you can implement this same functionality using a WHILE loop too

    • @EzzatFarid
      @EzzatFarid 5 месяцев назад

      DECLARE count : INTEGER count <-- 0 WHILE count <> 10 DO count <-- count + 1 ENDWHILE is it like this?

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      @@EzzatFarid Yes...but usually, rather than <>, the mark schemes would just use count < 10

  • @EzzatFarid
    @EzzatFarid 5 месяцев назад

    can you please explain simply how the endindex = endindex - 1 works, i couldn't understand it.

    • @PseudocodePro
      @PseudocodePro 5 месяцев назад

      Try a simple bubble sort on paper with the numbers [5, 3, 4, 1, 2] After the first loop, you will notice the number 5 is in the rightmost position (i.e. the biggest element will be sorted)...after the 2nd loop, the 2nd biggest element (4) will be in the 2nd rightmost position...after the 3rd loop, the 3rd biggest element will be in the 3rd rightmost position and so on...so each loop, we ca decrement the endIndex by 1...since we know the elements to the right of it will be sorted Does that make sense?

    • @EzzatFarid
      @EzzatFarid 5 месяцев назад

      yes thank you so much@@PseudocodePro

  • @randroid4504
    @randroid4504 5 месяцев назад

    lol i sat for this exam

  • @BrickCustoms.
    @BrickCustoms. 6 месяцев назад

    First!

  • @chills5100
    @chills5100 6 месяцев назад

    I literally did this question 4 hours ago lol did not know some things so now will watch your video. Keep up the grind

  • @BrickCustoms.
    @BrickCustoms. 6 месяцев назад

    its me milligrams, i make content too! thanks so much!

    • @PseudocodePro
      @PseudocodePro 6 месяцев назад

      Glad it's useful...so about your vids...you mean you actually make those lego figures yourself?

    • @BrickCustoms.
      @BrickCustoms. 6 месяцев назад

      @@PseudocodePro its VERY time consuming but yes!

    • @PseudocodePro
      @PseudocodePro 6 месяцев назад

      @@BrickCustoms. ...how? Do you have a mold to make the plastic or something...or 3D printer?

    • @BrickCustoms.
      @BrickCustoms. 6 месяцев назад

      @@PseudocodePro ahahha its LEGO 😂

    • @PseudocodePro
      @PseudocodePro 6 месяцев назад

      @@BrickCustoms. Haha ok...so you put different pieces together? I thought you meant you actually made completely new lego pieces that don't exist from the manufacturer themselves?