Difference between revisions of "FAQ - Mod 4"

From CSE330 Wiki
Jump to navigationJump to search
(Created page with "Welcome to the frequently asked questions page for Module 4. As many common questions can come up on Piazza, some of those questions are consolidated here. == Regular Express...")
 
 
Line 44: Line 44:
 
=== Do I have to save the output of our python script to a .txt file or can I just print it out? ===
 
=== Do I have to save the output of our python script to a .txt file or can I just print it out? ===
 
You can just print the output of your script. No need to save it to a .txt file
 
You can just print the output of your script. No need to save it to a .txt file
 +
 +
[[Category: Module 4]]

Latest revision as of 02:09, 21 December 2020

Welcome to the frequently asked questions page for Module 4. As many common questions can come up on Piazza, some of those questions are consolidated here.

Regular Expressions Cases

When parsing for a string, should I look for that string exclusively or that string concatenated with other characters?

If you are looking for a string, you should be looking for any exact occurrences of that string. This is the case regardless of what characters are appended to the beginning or the end of said string.

Example: Parsing for "hello world"

What Should Work

hello world, hi hello world, hello worldwide, hhhello worlddd

What Shouldn't Work

hello weorld, hello to the world

In RegEx exercise 2, should I accept strings that have more than three consecutive vowels?

In this exercise, strings with three or more vowels should be accepted.

What Should Work

beautiful, queue, coooool!

In RegEx exercise 3, is each line a separate input?

Yes. Each line with a potential flight code is a separate input. Your expression does not need to account for separating each potential code.

If a batting average ends in a 0, can I round to two decimal places?

A batting average must always be rounded to 3 decimal places, regardless of if it ends in one (or more) zero(s).

Expected Batting Average Outputs

.270, .300, .050

Unacceptable Batting Average Outputs

.27, .3, .05

Logistics

Should I complete this module on my local machine or on my instance?

Unlike other modules, this one can be completed on your local machine!

Do I have to save the output of our python script to a .txt file or can I just print it out?

You can just print the output of your script. No need to save it to a .txt file