15,190 Topics

Member Avatar for
Member Avatar for Aman_24

Write a function that takes a number n as input and returns a tuple of two values - the number of digits in that number and sum of digits in that number.

Member Avatar for JamesCherrill
-1
153
Member Avatar for Aman_24

Write a function that takes as argument a string containing multiple words and returns a string containing the same words in reverse order. Eg., input = 'India is a democracy'; output = 'democracy a is India'

Member Avatar for AndrisP
0
589
Member Avatar for Future_1

I want to recall a root that i had destroyed. But if i use root.destroy() Then when i want to recall root, It doesnt work...... ..........Please answer my question......

Member Avatar for rproffitt
0
94
Member Avatar for YpowT

Hi all, I am building a GUI application using Python and Tkinter to mimic a Pay-At-Pump system. Currently, I am at stage where I have coded and defined the relevant frames and widgets that help to traverse through those frames, these are organised into classes. However, I am trying to …

Member Avatar for YpowT
0
1K
Member Avatar for Sonam_7

Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file. You will need to decide on the following: How to format each dictionary item as a text string in the input file. How to covert each input …

Member Avatar for Reverend Jim
0
120
Member Avatar for user287961

Hi,i have this code that i need to turn in for my homework. I based it off some things i saw on the internet. The point of the homework is that i need to have 2 or more structures and use some functions. It would mean a lot if someone …

Member Avatar for nullptr
0
459
Member Avatar for Chinney

Hello everyone, hope you're having a great day :D I have a project idea in mind but unsure how to go about solving it / unsure if i can solve it. I want to be able to classify messages to categories, where not all categories are known. I want the …

0
129
Member Avatar for ppel123

Hi, I am trying to create an app with 2 python files, the first reads the user input (either from python shell or directly from the keyboard via modules like pynput-keyboard) and stores it in a variable (after enter pressed). The second creates the gui that has 2 labels and …

0
2K
Member Avatar for adisharma

Hello Everyone, I want to learn python to become a game developer and I looking to learn python course online but I am confused about which course is good for a fresher point. I have worked on the python module also so I have basic knowledge about it. If anyone …

Member Avatar for Rohan_15
1
557
Member Avatar for Czech

Hi guys im making a memory game but i need to add random letter to buttons and if some button have same letter it will turn green and if not it will turn red. i will send here only 2 buttons because i have 27 buttons in my code but …

Member Avatar for Reverend Jim
0
173
Member Avatar for Sharpay

The question and my solution are attached. I do not know how to correct it. I hope someone can show me a correct and complete answer. Thanks! ![program.png](/attachments/large/4/ea29c5dabdaa2da909f7b82b4277c5f2.png) ![微信图片_20200302011413.png](/attachments/large/4/cdaba293002a1fcf746e6cd6344d4ddb.png) ![微信图片_20200302011421.png](/attachments/large/4/dcfa743ceb40fdcbedd22f1248b6ae97.png)

Member Avatar for JamesCherrill
0
156
Member Avatar for V.

Hello, I'm trying to build a count up, now I have the problem, that I don't know how to show the numbers on the screen. So I found tkinter, but I need to refresh the content of the window (e. g. every hour). How can I manage to do that? …

0
99
Member Avatar for ppel123

Hi everyone, I am working on a project (just started) in PYTHON and I want to create a keylogger for 2 languages english and greek. For this I have created the below (it is under "construction") code. from pynput.keyboard import Key, Listener from langdetect import detect from pynput import keyboard …

Member Avatar for rproffitt
0
1K
Member Avatar for Phummanat

p=int(input("Enter money: ฿ ")) n=int(input("Enter price: -฿ ")) x=p-n print("Change is ฿",(x)) print("Bank 1000 =",(x//1000),('bill/bills')) print("Bank 500 =",(x%1000//500),('bill/bills')) print("Bank 100 =",(x%1000%500//100),('bill/bills')) print("Bank 50 =",(x%1000%500%100//50),('bill/bills')) print("Bank 20 =",(x%1000%500%100%50//20),('bill/bills')) print("Coin 10 =",(x%1000%500%100%50%20//10),('coin/coins')) print("Coin 5 =",(x%1000%500%100%50%20%10//5),('coin/coins')) print("Coin 2 =",(x%1000%500%100%50%20%10%5//2),('coin/coins')) print("Coin 1 =",(x%1000%500%100%50%20%10%5%2//1),('coin/coins')) q=x//1000 w=x%1000//500 e=x%1000%500//100 r=x%1000%500%100//50 t=x%1000%500%100%50//20 y=x%1000%500%100%50%20//10 u=x%1000%500%100%50%20%10//5 i=x%1000%500%100%50%20%10%5//2 o=x%1000%500%100%50%20%10%5%2//1 l=q+w+e+r+t+y+u+i+o print("all …

Member Avatar for wwwalker
0
229
Member Avatar for Jorge_16

Can someone help me with this program? How do you discard values? Below is a code that was used in the first expedition to Mars, which simplified the two-letter terms to make the transmission easier. AA: Glycine TU: Arginine " AT: Cysteine UA: Serine AU: Start UT: Delete TT: …

Member Avatar for rproffitt
0
177
Member Avatar for drake3

i'm making a program after the user finishes answering asks him to repeat or if he wants to enter another values and keep asking till the user says different than continue

Member Avatar for Reverend Jim
0
187
Member Avatar for abdallah mohamad

hello everybody im trying to compute the log(n) while n in the first time =10 and second time =100 , third =1000 and fourth = 10000 but an error still happenening the error is math domain error can anybody help in this code and error import math import logging n …

Member Avatar for rproffitt
0
343
Member Avatar for bhavya_7

I have daily scatsat level4 data for wind for year 2017 in a single folder I need to calculate the windspeed of the data and average of windspeed for 8 days for the whole year and need to plot it in a image using quiver plot **I am able to …

0
398
Member Avatar for willie55

Good Day i'm not new to this community but i haven't been in participation of anything relating to programming for year but now i'm interested in learning Python Programming language and i believe with your help i can achieve it. Please if there is any group chat (Whatsapp) that can …

0
103
Member Avatar for Mohan_12

Hi All i am having a python code i have to convert this to java i have placed the code below import boto3 import sys import re import json def get_kv_map(file_name): with open(file_name, 'rb') as file: img_test = file.read() bytes_test = bytearray(img_test) print('Image loaded', file_name) # process using image bytes …

Member Avatar for rproffitt
0
584
Member Avatar for Daniel_118

# Find minimum integer coefficients for a chemical reaction like # A * NaOH + B * H2SO4 -> C * Na2SO4 + D * H20 import sympy import re # match a single element and optional count, like Na2 ELEMENT_CLAUSE = re.compile("([A-Z][a-z]?)([0-9]*)") def parse_compound(compound): """ Given a chemical compound …

Member Avatar for JamesCherrill
0
422
Member Avatar for TylLang

Tyl is a programming language that is intended for curious people who are interested in software development, as well as for intermediate and experienced developers who want to try a different programming language. Some of Tyl features: - Clean code - Symbolized keywords - One-line statements - System modules & …

Member Avatar for Reverend Jim
1
944
Member Avatar for Zarar_1
Member Avatar for Christina_7

Hi Dani, I'm new to Python . I started working on an automation project where i need to connect to a SunOS server through a windows jump server and run commands to get output on my local machine. I checked this existing module on python called jumpssh but not sure …

Member Avatar for rproffitt
0
781
Member Avatar for alice2002

I'm an absolute beginner. I needed help in creating a "loop"(idk if that's what it would be called). Basically I want to know how I can make a menu where I can select an option and then go back to the previous menu and creating kind of a loop somehow, …

Member Avatar for stokes
0
388
Member Avatar for zoro007

Hello, Please i need help with python 2.7 i use "from string import Template" and there error with Unicode if i print the string without Template working good and if i print it under Template appear error ""AH01215: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8: ordinal not …

Member Avatar for zoro007
0
411
Member Avatar for Abdallaselim77

MyMainWindow::createUI() { label = new QLabel("foo"); button = new QPushButton("Browse"); connect(button, SIGNAL(clicked()), SLOT(browse())); layout = new QHorizontalLayout(); layout->addWidget(label); layout->addWidget(button); setLayout(layout); } void MyMainWindow::browse() { QString directory = QFileDialog::getExistingDirectory(this, tr("Find Files"), QDir::currentPath()); if (!directory.isEmpty()) { if (directoryComboBox->findText(directory) == -1) directoryComboBox->addItem(directory); directoryComboBox->setCurrentIndex(directoryComboBox->findText(directory)); } } MyMainWindow::createUI() { label = new QLabel("foo"); button = …

Member Avatar for Reverend Jim
1
908
Member Avatar for Mariam_9
Member Avatar for Connor_1

The purpose of this assignment is to provide you with experience in coding programs that make use of parallel lists. This program maintains 2 parallel lists. The first list maintains names of students and the second list maintains their grades. These 2 parallel lists are shown below: Elements in parallel …

Member Avatar for rproffitt
0
579
Member Avatar for joy_deep

Hello, I am new to Python. I am learning boxsizer. I want to put two buttons on my panel. One at top right corner and one at bottom right corner. How do I achieve this? Thanks

Member Avatar for Jonny_4
0
997

The End.