Skip to content

Tag: python

DJango testing multiple database application

I have django application which has two database defaultdb and externdb The application works well but when testing ,this error occurs below when trying to access the extern database This error occurs which setting should I check?? Answer Change: to this: OR You can also add databases = “extern” t…

Calendar Data Picker in Selenium

Hi I am trying to figure it out how to pick day from the calendar in Python. I would like to select the date 04/27/2022 under requested loading date. I read some post related to this but I could not figure it out. This is what I did so far but not working. enter image description here Answer You do

Trying to program a basic snake game in python (keeps “crashing”)

So I’m trying to teach myself a little bit of python for fun following this tutorial: https://www.youtube.com/watch?v=8dfePlONtls I made it to the point where the dot keeps moving automatically (left, right, up or down) depending on which arrow key I pressed last. But for some reason it all stops after …

Snell’s Law not functioning

I am writing a program to calculate light refraction using snell’s law, however, when I run the program it prints -0.7076118148 rather than the correct value of 22 Answer You’re using degrees instead of radians. You’ll have to convert, e.g like this: => 22.082413194472252