15,181 Topics

Member Avatar for
Member Avatar for Vevo

Hello, I wrote this code in order to obtain a series of monthly weather observations at Helsinki for a period from 1960 to 2020 and then I saved the data to a local file using package pickle. I used the data available from the API provided by the Finnish Meteorological …

Member Avatar for Vevo
0
845
Member Avatar for Youssef Faisal
Member Avatar for Tom_380

I'm trying to create buttons with a for, but I want every button to have a different name, so I can later differenciate them and use them easily. As you can see on the screenshot, python doesn't accept the names for the button. There's probably an easy way to do …

Member Avatar for Schol-R-LEA
0
216
Member Avatar for beaverseed
Member Avatar for rproffitt
0
42
Member Avatar for asfghjkl

Hi everyone, I just want to ask if how i am able to make an if else statement inside a switch case. i want to execute something wherein the user may be able to choose again if he/she would like to do another transaction. for example, the user choose Yes …

Member Avatar for kasmar45
0
266
Member Avatar for jhon_20

how to implement a python function that output 1000 strings that are very similar (only differ in one bit)?

Member Avatar for rproffitt
0
32
Member Avatar for ミツキ 上野

so i already posted three months ago and only reviwed my coded recently , still dotn know what is wrong . the code is quite simple however something keeps going wrong. a possible flaw is the FPS clock which would expain why its black screen but the visible when i …

Member Avatar for Schol-R-LEA
0
43
Member Avatar for Humaira_5

Is there any way I can calculate pairwise distance matrix in python (not biopython) from a file containing 3 rows as: ACCGGT-TAACA ACCGT--AACCG ACCGTGCCTAG

Member Avatar for rproffitt
0
31
Member Avatar for gdtraveller

I'm developing a calendar application The top level window is a frame containing a panel that displays the calendar grid and a panel that contains a "Close" button. I'm unable to obtain the size of the calendar grid panel. When I add code to get the panel size, the result …

Member Avatar for Reverend Jim
0
545
Member Avatar for Humaira_5

Hello, I am quite new to python programming and I need help with writing a code to calculate distance matrix from a text file that contains something like this: ACCGGTGGAACCGG-TAACACCCAC ACCGGT--AACCGGTTAACACCCAC ACCGGTGGAACCGGTAACACCCAC- ACCGGT--------TAACACCCAC-

Member Avatar for rproffitt
0
33
Member Avatar for eliasarximan

Can Someone help me to convert my Python Code to Java Code please? My Python Code : def import_file(file): with open(file,"r") as f: lines = f.readlines() sline = [] for line in lines: xline=line.split(" ") sline.append(xline) return sline def set_file(idf,q,sline): for i in sline: if idf in i: sline[sline.index(i)][1] = …

Member Avatar for Srinu@231
0
291
Member Avatar for shak187

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much appriciated

Member Avatar for eliasarximan
2
154K
Member Avatar for Benjamin_32

write a function called create_bar_plot that takes two arguments, 1) a matplotlib Axes object and 2) a dictionary. The function should call the bar method on the Axes object with the relevant arguments to make it work. Remember to convert the values from strings to numbers before plotting (and note …

Member Avatar for Dani
0
57
Member Avatar for emmamark

Hi Proggit! I've decided to learn how to develop for the web, and I want to learn how to create websites from scratch. So far I've figured out that I need to learn HTML, CSS, and javascript for user-side development. However, I'm having more trouble figuring out what to do …

Member Avatar for emmamark
0
108
Member Avatar for razstec

Hi, i have this script but cant seem to open the browserframe in the correct place ![Captura_de_ecrã_2021-10-25,_às_11_07_07.png](https://static.daniweb.com/attachments/4/6e99ec442a2fea1bedb081e65e6e1534.png) import ctypes import platform from cefpython3 import cefpython as cef from tkinter import * import tkinter as tk import sys # platforms WINDOWS = platform.system() == 'Windows' LINUX = platform.system() == 'Linux' MAC …

Member Avatar for razstec
0
180
Member Avatar for fonzali

hi , I found this code on the internet , I changed and added some lines to it to make it the way I like . I am very weak in using functions and even worse in using classes , I appreciate it if some one can change this code …

Member Avatar for Thati
0
5K
Member Avatar for Mina13

Error: AttributeError: 'str' object has no attribute 'sort' brand_name = "Huawei" count = 3 while count <= 3: brands = str(input(" Enter cellphone brandname:")) brand_name.insert(brands, count) count = 1 + count brand_name.sort() brand_name.remove("Huawei") print(brand_name)

Member Avatar for Reverend Jim
0
40
Member Avatar for hweyeongimnida

The code is here: https://medium.com/swlh/balancing-chemical-equations-with-python-837518c9075b

Member Avatar for rproffitt
0
47
Member Avatar for RoqueyB

so i have an assignment for a class to make a pick up sticks game. This is the actual assignment: "The rules of pick up sticks are as follows: The user chooses the number of matchsticks (5 to 50) to place in a pile. Then, the computer chooses who will …

Member Avatar for Ben_493
0
9K
Member Avatar for kimvibar51

Using for loop create a program that converts temperature either from Celsius to Fahrenheit or vice versa. Ask the user what will be the input of the user either in Celsius or Fahrenheit. If the input is invalid, print invalid and ask to try again. Ask the user to input …

Member Avatar for rproffitt
0
80
Member Avatar for Essam_6

print("Enter number of columns:",end=" ") cols=int(input()) print(cols) print("Enter number of rows:",end=" ") rows=int(input()) print(rows) print("") side="right"0 print("[5][5] is cleaned") for i in range(rows): if side=="left": for j in range(1,cols): print("Move forward") print("[{i}][{j}] is cleaned".format(i=i,j=j)) else: for j in range(cols-2,-1,-1): print("Move forward") print("[{i}][{j}] is cleaned".format(i=i,j=j)) if(i!=rows-1): if side=="left": print("Turn right") print("[{i}][{j}] …

Member Avatar for rproffitt
0
45
Member Avatar for arvind_m

I am a Data Science Enthusiast, Currently Exploring Different Types of Programming Languages.

Member Avatar for Reverend Jim
0
26
Member Avatar for dimitrilc

## Introduction ## Although not included in the headlines, the release of JDK 17 also added 3 sets of new methods to the class `java.lang.Process`: 1. `inputReader()` to read from stdout. 2. `inputWriter()` to write to stdin. 3. `errorReader()` to read from stderr. In this tutorial, we are going to …

3
1K
Member Avatar for systemprox

I am sketching the architecture for a set of programs that share various interrelated objects stored in a database. I want one of the programs to act as a service which provides a higher level interface for operations on these objects, and the other programs to access the objects through …

Member Avatar for rproffitt
2
94
Member Avatar for razstec

Anyone know why this is not adding borders to my sheet? thick = Side(border_style="thick", color='FF0707') ws['F1'].border = Border(top=thick, left=thick, right=thick, bottom=thick) for row in ws['A1:D10']: for cell in row: cell.border = Border(top=thick, left=thick, right=thick, bottom=thick)

Member Avatar for Reverend Jim
0
38
Member Avatar for razstec

i have this line to set the background color of a cell but instead of the color i specified it set the cell to black. Tried with diferent colors to check and it always set it to black. why is that and how to fix it? ws['A1'].fill = PatternFill(fgColor="7FFFD4", fill_type="solid") …

Member Avatar for razstec
0
124
Member Avatar for Sachin_35

I need to create a script in python to unmute speaker, if it is mute. The Scripts will check if speaker is in mute, if it is in mute than it will unmute it. If it is unmuted already, than it shouldn't do anything.

Member Avatar for rproffitt
0
37
Member Avatar for gdtraveller

Hi everyone, I've been researching various python libraries to extract data from pdf files. Currently, I'm exploring PyMuPDF After installing it, I try to run a basic script to get the number of pages in the pdf file. However, the following runtime error occurs. File "/usr/local/apps/PyMuPDF-1.18.17/fitz/fitz.py", line 1281 def is_rectangular(self) …

Member Avatar for Reverend Jim
0
93
Member Avatar for Reverend Jim

**Requires:** 1. Python version 3.8 or newer 2. wxPython version 4.0 or newer 3. exif module 4. Windows with NTFS file system To ensure you have the required packages please run the following 1. python -m pip install --upgrade pip 2. pip install exif 3. pip install wxPython I have …

Member Avatar for kimwel
4
1K
Member Avatar for mouigher

I'm not very good at Python as you can tell from my earlier posts. I'm trying to write a payroll program that gets the input from the user of how many hours worked and the hourly rate and calculates the total wages for the week. It also has to figure …

Member Avatar for Minasa
0
3K

The End.