oop tag

60 questions


2 answers
96 views
0
To join a python list element to a certain rule

# Parsing matchalpha_list = [A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P]# After parsing alpha_list = [A, &, B, &, C, &, D, &&, E, &, F, &, G, &, H, &&, I, &...


1 answers
91 views
0
To print sentences in reverse order while statements

sentence='There is a sun in the mouse hole.'i=len(sentence)-1while i >= 0 : if sentence[i]=='': print('-') else: print('%s'% sentence[i],end='') i-=1

2 years ago

1 answers
91 views
0
I have a question about java infinite loop

public static String solution(String new_id) { for(;;) { for(int i = 0; i < answer.length(); i++) { If(answer.substring(i) == .) { // When the period is met } } else { break; } } } return a...

2 years ago

2 answers
94 views
0
Self-Error when entering a string for a question that requires a decimal point

I make a code to enter the second decimal placeIf you enter a string, or if you enter a decimal point incorrectly, Print a print (Re-enter).You want to prompt again to enter the second decimal place.B...

2 years ago

1 answers
126 views
0
Use while loop to convert from Python Decimal to binary

For example, to convert the number 92 to binary:92 / 2 - quotient = 46 remainder = 046 / 2 - quotient = 23 remainder = 023 / 2 - quotient = 11 remainder = 111 / 2 - quotient = 5 remainder = 15 / 2 - q...

2 years ago

1 answers
104 views
0
I change the Python while statement to for statement, but I don't get the same execution value

###Global variable declaration part##i,k=0,0##Main code part ##i=0while i<9: if i<5: k=0 while k<4-i: print(' ', end='') k+=1 k=0 while k<i*2+1: print('\u2665', end='')###Global var...

2 years ago

1 answers
79 views
0
It's a C++ question

Hi, everyone.I'm asking you this question because I don't understand something because I'm a C++ beginner.#include <iostream>using namespace std;// *** Declaration of Global Variables ***// #1in...

2 years ago

1 answers
107 views
0
Python Dictionary while statement registration code

Please help meI was looking for it for 4 hours and this is the code I came up withIt works, but I can't print out the last word added. TT: Please save meㅠ


1 answers
103 views
0
While loop problem 1

Create function multiplies_of_k(n,k), in which n and k are two integers larger than 0. The function will return a list, which contains all the multiplies of k not larger than n in ascending order. k, ...

2 years ago

1 answers
141 views
0
How to turn a Python structural program into an object-oriented program

kors=[]def print_menu(): print ('\nGrade Processing Program') print ('1. Score input') print('2. Grades output') print ('3. Exit') print(-*20) menu = int(input('select action(1~3) :') return menudef i...

2 years ago
« - 6 -

© 2024 OneMinuteCode. All rights reserved.