#🔒 studying for python exam

21 messages · Page 1 of 1 (latest)

stable pewter
#

I am not a cs student and currently taking an intro class to coding. I am struggling badly with this class as the teaching quality is abysmal and I suck at self teaching myself.

I am looking to just get 40% for the exam. I have posted screenshots of a sample paper so maybe you could recommend the topics i should focus on (maybe good resources too). Thanks

delicate yachtBOT
#

@stable pewter

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

celest zealot
#

idk if this is allowed or not

#

oh nvm

#

its studyig

rose spire
stable pewter
#

It’s just a sample paper

rose spire
cinder hemlock
#

question 11: this is an old-school way of accessing the elements of arrays when you had to use numbers to choose the location from which you extracted elements of the array. It uses the built-in range() function and a for loop, so here you focus on knowing the basic build-in functions, how loops work and the data structure list and how to use lists

cinder hemlock
#

question 12: this is a basic trick you learn. The way you can differentiate between even and odd numbers is that any even number is divisible by 2 without a remainder. The % modulo operator returns the remainder after division, so number % == 0 is only True for even numbers. Here I think you want to review basic algorithms

#

lol there is a big jump from Q12 to Q13 😄

#

for Question 13 you want to go over classes and dunder methods, understand what self is and how it works, string formatting (e.g. f-string) and ideally have a go at writing some classes yourself so you get to try and think of solutions for the tasks they ask of you, which are quite common things you encounter when writing normal code outside of the lessons (here knowing the built-in functions would help you with rounding the result)

#

for Question 14: get familiar with the popular matplotlib library which forms the basis of most mathematical plotting in python, review how to read text files and do basic string manipulation like .strip(). The nucleotides can be counted using a dictionary and a for loop. The plot is done using pyplot.bar and you need to know how to change the x and y axis labels and the title

#

Question 15 is again a jump in difficulty, at this point it might be a good idea to start doing challenge problems like hackerrank.com or leetcode.com or similar which will teach you how to think about these problems and how to approach solving them

#

@stable pewter hope some of that was helpful

stable pewter
cinder hemlock
delicate yachtBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.