Conditions and Loops: Exact Filenames
Conditions and Loops: Exact Filenames
2024, 10:00 pm
Important Information!
Please try to exactly match the output given in the examples (naturally, the input can be
different). We are running automated tests to aid in the correction and grading process, and
deviations from the specified output lead to a significant organizational overhead, which we
cannot handle in the majority of the cases due to the high number of submissions.
Note that in general, after a : there is always a fixed white space. Feel free to copy the output
text from the assignment sheet, and then change it according to the exercise task.
1
Programming in Python I Assignment 2 – Due: 29.10.2024, 10:00 pm
In case of valid inputs (i.e., no errors as described above), print both the bonus (float with 2 decimal
places; see the example input and output below for how it must look like). Do not perform unnec-
essary checks, i.e., do not check for values that have already been excluded by previous conditions.
Example input and output:1
Enter employment years (> 0): 2
Enter department (10-99): 8
Invalid input
1
Green colored text indicates user input from the console.
2
Programming in Python I Assignment 2 – Due: 29.10.2024, 10:00 pm
3
Programming in Python I Assignment 2 – Due: 29.10.2024, 10:00 pm
4
Programming in Python I Assignment 2 – Due: 29.10.2024, 10:00 pm
*
* *
* *
* *
*
*
* *
* *
* *
* *
* *
*
Before you start programming, try to find a general pattern depending on the given size: How many
spaces must be printed in respective lines before a star * has to occur?
Example input and output:
Diamond size: 1
Invalid size