HI All,
I have a requirement where I get an excel spreadsheet with small Cobol code in a cell.
Sample Code :
If studentGrade >= 90 Then
2 resultLabel.Text = "A" ' display "A"
3 Else
4 If studentGrade >= 80 Then
5 resultLabel.Text = "B" ' display "B"
6 Else
7 If studentGrade >= 70 Then
8 resultLabel.Text = "C" ' display "C"
9 Else
10 If studentGrade >= 60 Then
11 resultLabel.Text = "D" ' display "D"
12 Else
13 resultLabel.Text = "F" ' display "F"
14 End If
15 End If
16 End If
17 End If
the output should be in a plain English paragraph.
Output Should be: If student grade is greater than 90 the set text as A. If student grade is greater than 80 then set text as B and so on. Need to take care of starting if and ending if condition.
The main idea of this is that for a non-programmer to understand what exactly is happening in the code.
Could you please let me know how this can be done in python.
Thank you
Venkat
I have a requirement where I get an excel spreadsheet with small Cobol code in a cell.
Sample Code :
If studentGrade >= 90 Then
2 resultLabel.Text = "A" ' display "A"
3 Else
4 If studentGrade >= 80 Then
5 resultLabel.Text = "B" ' display "B"
6 Else
7 If studentGrade >= 70 Then
8 resultLabel.Text = "C" ' display "C"
9 Else
10 If studentGrade >= 60 Then
11 resultLabel.Text = "D" ' display "D"
12 Else
13 resultLabel.Text = "F" ' display "F"
14 End If
15 End If
16 End If
17 End If
the output should be in a plain English paragraph.
Output Should be: If student grade is greater than 90 the set text as A. If student grade is greater than 80 then set text as B and so on. Need to take care of starting if and ending if condition.
The main idea of this is that for a non-programmer to understand what exactly is happening in the code.
Could you please let me know how this can be done in python.
Thank you
Venkat