Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 8 months ago. Improve this question Question: Enter a value for n, and the code takes n floating numbers and prints out the first highest and second-highest numbers. Sample Output 1:
Tag: python-3.x
Connect two comboboxes via a dictionary (with the purpose to display male or female names in the combobox)
I have a combobox where I select the gender Male or Female. Then I have another combobox where now all the names of people are displayed (without distinction of gender). I would like to select Male from the first combobox and automatically display (without button) the Male names in the second combobox. The same thing for Female names. Thank you
How to Bulk insert data into MSSQL database in a AWS Glue python shell job?
I have large sets of data in s3. In my Python glue job, I will be extracting data from those files in the form of a pandas data frame and apply necessary transformations on the data frame and then load it into Microsoft SQL database using PYMSSQL library. The final data frame contains an average of 100-200K rows and 180
KivyMD widgets displaying at the bottom of page in MDBoxLayout
KivyMD widgets are displayed at the bottom when using MDBoxLayout. I remember two MDTextField widgets and one MDRaisedButton, but they are located at the bottom. When using Kivy without KivyMD, there is no such problem. Here is my code: Result: Result of run this code I tried to replace MDBoxLayout to BoxLayout and MDScreen to Screen, but this not helped.
Number Formatting in DataFrame
How can I format a subset of a DataFrame according to a custom formatting logic? Before: Country Last Previous Abs. Change 0 United States 8.60 8.30 0.30 1 Japan 2.50 2.50 0.00 2 China 2.00 2.10 -0.10 3 United Kingdom 9.10 9.00 0.10 4 Euro Area 8.10 7.40 0.70 After: Country Last Previous Abs. Change 0 United States 8.6 8.3
How to turn a variable iterable?
Is there any way I can turn a variable iterable in a for loop? I am trying to make a password generator and for the for loop I use a variable which is an input number. When I try to use a variable in a loop I get ‘int’ object is not iterable. Answer Erm… something like Like this? For
How to make enumerate not count blank’s indexes?
I am trying to writing a function which will take a sentence and make each odd letter an uppercase one and each even letter a lowercase one. Here is what I tried: When the input is “Hello my guy”, the output is “HeLlO My gUy” and not “HeLlO mY gUy” because it counts blank as a letter, what can I
python how to combine two list (key/vaule pairs), which has list of dicts
I have two lists and each list has multiple items. here is the example: x: lst: desired output: new_list: i want to create a new key called “resource_allocation” and add “lst” item value to it, show above i am trying to do like this: got error: i am sure i am doing it wrong, can any one suggest me the
How to pass variable to base class
Consider the following Python code (Python 3): I have a class Signal comprising all the functions signals of all different kinds should be able to perform. For each kind of signal, I create a new class, where the data is “sampled”, meaning an array with signal data is specified. If I now want to plot the signal, the plot method
Pyinstaller one file package is leaving temp files when crashed, how to clean those automatically?
I am using pyinstaller to create one file executable with command line. Like all “one file” exeutables, it extracts binaries/dependencies in one temporary folder of OS whenever opened. It generally clean those after closing the application properly but when I close the command line (or when the app crashes) then it leaves all those extracted temp files behind in that