On 11/8/20 9:20 PM, Chris Angelico wrote:
Perhaps, but certainly the confusion is far less when the module is
always imported as itself, and then the class is "datetime.datetime"
which nicely parallels "datetime.date" and "datetime.time".
I find doubled names such as "datetime.datetime" both j
grade = input("Enter your grade: ")
if grade >= 90:
print("You got an A ")
if grade >= 80:
print("You got a B ")
if grade >= 70:
print("You got a C")
if grade >= 60:
print("You got a D ")
if grade >= 50:
print("You failed")
How can I make this to say if your grade is 90 or h
if 100 > grade >= 90:
On Mon, Nov 9, 2020 at 6:01 PM Quentin Bock wrote:
> grade = input("Enter your grade: ")
> if grade >= 90:
> print("You got an A ")
> if grade >= 80:
> print("You got a B ")
> if grade >= 70:
> print("You got a C")
> if grade >= 60:
> print("You got a D ")
On Nov 9, 2020 5:59 PM, "Quentin Bock" wrote:
>
> grade = input("Enter your grade: ")
> if grade >= 90:
> print("You got an A ")
> if grade >= 80:
> print("You got a B ")
> if grade >= 70:
> print("You got a C")
> if grade >= 60:
> print("You got a D ")
> if grade >= 50:
> prin
On 2020-11-09 21:04, Quentin Bock wrote:
grade = input("Enter your grade: ")
if grade >= 90:
print("You got an A ")
if grade >= 80:
print("You got a B ")
if grade >= 70:
print("You got a C")
if grade >= 60:
print("You got a D ")
if grade >= 50:
print("You failed")
How
On 10/11/2020 10:04, Quentin Bock wrote:
grade = input("Enter your grade: ")
if grade >= 90:
print("You got an A ")
if grade >= 80:
print("You got a B ")
if grade >= 70:
print("You got a C")
if grade >= 60:
print("You got a D ")
if grade >= 50:
print("You failed")
Firs
I have a situation where in a directory tree I want to change a certain
string in all files where that string occurs.
My idea was to do
- os.scandir and for each file
- check if a file is a text file
- if it is not a text file skip that file
- change the string as often as it occurs in t
Manfred Lotz writes:
> I have a situation where in a directory tree I want to change a certain
> string in all files where that string occurs.
>
> My idea was to do
>
> - os.scandir and for each file
>- check if a file is a text file
>- if it is not a text file skip that file
>- chang
On 10Nov2020 07:24, Manfred Lotz wrote:
>I have a situation where in a directory tree I want to change a certain
>string in all files where that string occurs.
>
>My idea was to do
>
>- os.scandir and for each file
Use os.walk for trees. scandir does a single directory.
> - check if a file is