r/pythontips • u/HotGrabba • May 05 '21
Module University First Assignment/
So I am exactly 2 days into a intro to programming course. So far we have not done any coding. We haven't talked about syntax, regular expressions, if, while, or anything such as this (i did java a few years back so im familiar with these things vaguely). However the professor assigns us this:
Develop an algorithm to determine the numbers of “Regular” and “Urgent” customer support requests stored in a queue. Specify the Algorithm using a flowchart. The number of requests in the queue is assumed to be a positive integer Q, provided as input.
Hint: Reading a request from a queue would reveal its type (“Regular” or “Urgent”). One may assume the queue to be populated with requests beforehand. Alternatively, one may populate the queue at the beginning of the algorithm with requests whose types are randomly assigned to be “Urgent” or “Regular”
We just downloaded pycharm and python so this came out of the blue. We havent even learned if statements of while statements yet. Its been two days...
Any ideas as to how to go about this question?
15
u/SpecOpsTheLineFan May 05 '21
As it is a question to develop an algorithm and pictorially represent it using a flowchart, you don't necessarily need to know Python. The algorithm will generally remain the same for most languages like Java, C++ etc. What they want you to do is to prepare a basic idea on how to solve the question.
Here, you have a queue of requests. You need to find out the number of regular and urgent requests. So how will you go about it? What is the first step? How do you plan to count the number of requests of each type? At what point would you check for the request type? Is there a need for loops or branching? Such questions are to be answered here. No need to type out the Python code for it.
5
9
u/HotGrabba May 05 '21
ALSO PLEASE NOONE POST THE ACTUAL SOLUTION. Just want advice from actual python coders
2
-19
u/artofchores May 05 '21
That's bizarre and fukked up
Drop out of that class or speak to a uni representative and explain the situation. You paid to take a class. The professor should create an environment for you to learn ...not to stress out and not to doubt the professors teaching objectives.
Ive had to deal with that when I went to uni.
Good luck and post a follow-up!
1
6
-1
21
u/rjp0008 May 05 '21
Don’t use python or pycharm. They want you to draw a picture. Use Visio or ms paint.