32,204 Topics
| |
def Count_Total_Words(str1): total = 1 for i in range(len(str1)): if(str1[i] == ' ' or str1 == '\n' or str1 == '\t'): total = total + 1 return total string = input("Please Enter your Own String : ") leng = Count_Total_Words(string) print("Total Number of Words in this String = ", leng) | |
I know more information about this topic | |
Hi Dw. I had java 8 installed I'm, the problem is that when I run a bat file that uses the java it says Invalid maximum heap size -Xmx4g. I've even tried to uninstall and reinstall java but the same problem persists. I've added the Xms as well as Xmx … | |
I would like to know how it working. Here is the question.. isnt it put the method Iterable positions();? Please help me to figure it out. Suppose we want to extend the PositionalList ADT with a method, indexOf(p), that returns the current index of the element stored at position p. … | |
Hi everyone! I am 1st year student. I really need your help to complete this problem. I tried to execute this problem for 2days but still I didn't get the expected output of my teacher. Please help meeee. CREATE A PROGRAM IN JAVA ABOUT STUDENTS GRADES USING ALL TYPES OF … | |
I want to make sqlite table like this format: | Matric | Name | GitHub Link | Status | |--------|-------------------------- |---------------------------|--------| | 243340 | Yu Zhixiong | https://github.com/abcde | Yes | | 250634 | Ahmad Afham Bin Noor Azizan | | No | I get two link is first link … | |
do not understand this | |
Write a Java class Clock for dealing with the day time represented by hours, minutes, and seconds. Your class must have the following features: • Three instance variables for the hours (range 0 - 23), minutes (range 0 - 59), and seconds (range 0 - 59). • Three constructors: o … | |
Below is a program that asks the user to input a username and password. Once logged off the user is asked to re-enter their username and password. Is the program correct where it checks if the username and password input before is correctly input again?. Any help would be welcome … | |
I am trying to get information on when was the last date a file was modified in java. I have the date in long format. I dont know why the long object is showing the year to be 1970.Below is my code File mypath=new File(my_global_folder+"/"+mydata.getItemAtPosition(position)); long time=mypath.lastModified(); //When i try … | |
Hi, I would like to build a software career and am looking for the best software training institution. Can you please help me to find one? Thank!!! | |
![Inked235345364566556546_LI.jpg](https://static.daniweb.com/attachments/4/b5bf788aff340f6e41ee2b6d28f1f5c9.jpg) Sample output: Enter number of guests: 40 40 guests have been invited. Enjoy the party! | |
Hi all .. I've been doing my coursework .. I have done 30% of it .. but I've met problem since the day before yesterday .. I've tried to solve it but I couldn't .. I've been requested to write programme that promote the user to enter a file name … | |
Create an applet which contains one Combo Box for fonts name, One List Box for Font Size, and 3 Radio Buttons for Font Style i.e. Bold, Italic, Plain. The applet also displays some string message by a label. Write a Java program such that user will able to change the … | |
Write a program using for loops to produce an R by C rectangle, where R and C are provided by the user. The following are the triangles for different values of R and C. R is the number of rows and C is the number of columns | |
Develop a java program for a grading system tha satisfies the ff requirement:\ 1. for passing an exam, a student must pass by a score of 30 or more and assessment of 20 or more to be issued a certificate 2. if a student score a total grade of 49 … | |
Project Title: Student Record & Registration using Linked list This project is a Linked List application. The project considers st. Paul’s university having three departments: Business, Social Sciences and Computer Science. The university considers KCPE (O-level) , KCSE (A-level) and entry test marks for registering a student and calculate an … | |
I have a logfile like this, and I need to extract filenames. For File 1 of 209 - Need to extract **"01021997_0011708_ENDTREQ_111114.ica"** from the line "Src info : D:\Test\ica\01021997_0011708_ENDTREQ_111114.ica" where it has "Save : Can't save file! Error code = BADI (Bad image file)" File 2 of 209 - Need … | |
I having been trying to change the font size and textposition of a textfield but I have not had any luck. I am trying to change the font size of a text field. I would like the font that is typed in the text field to be bigger and bolded. … | |
![1.PNG](https://static.daniweb.com/attachments/4/30218db470c042804fbc7058f7117a58.PNG) ![3.PNG](https://static.daniweb.com/attachments/4/f977d47907c5d7e5c039898912f30603.PNG) ![2.PNG](https://static.daniweb.com/attachments/4/11426db454577787554b6cff488df663.PNG) | |
Hi Experts, I want to ask if there is a way if the user input a character it will handle an exception and go back again to the menu but in my code it wont go back to the menu. Thank you public class main { public static void main(String[] … | |
Hi. I have a little problem with my code. I want to cast a complete arrayList to a different type, but java wont let me... Here is a compressed version of what is happening: [CODE] //The interface I use. public abstract interface Drawable{ //some methods } //A class that is … | |
Hi Experts, Appreciate your help or advise as I am stuck. The user will input all of the objects (like name, gender, age) into the system. Once, user input it will write to a file. The program should only handle file handling. is my program correct? Thank you in advance … | |
Hi Experts, I have a question. I have an object and want to insert in a text file. Before inserting, I want to check if it is duplicate. If no duplicate is found, I will insert the object. If yes, will not insert an object? Do I need a collection … | |
def findMaximumPath(mat): rows = cols = len(mat) count_list = [] for i in range(rows): summ = 0 mat_index = [rows-1, cols-1] curr_index = [0, i] summ = mat[curr_index[0]][curr_index[1]] while curr_index[0] != rows-1 and curr_index[1] != cols-1: if mat[curr_index[0]][curr_index[1]+1] > mat[curr_index[0]+1][curr_index[1]]: curr_index[1] = curr_index[1] + 1 else: curr_index[0] = curr_index[0] + … | |
I would like to know how it working. Here is the question.. isnt it put the method Iterable positions();? Please help me to figure it out. Suppose we want to extend the PositionalList ADT with a method, indexOf(p), that returns the current index of the element stored at position p. … | |
how to code a 6/49 lottery draw using java and only random and scanner only is used. | |
I would like to know how it working. Here is the question.. isnt it put the method Iterable positions();? Please help me to figure it out. Suppose we want to extend the PositionalList ADT with a method, indexOf(p), that returns the current index of the element stored at position p. … | |
Hi, I would like to ask regarding File Handling in Java. I am creating a program for my school project and we should use file handling only (.txt) not database. When I add a product (with product code, product name, price, etc), I want to save it in a file. … | |
Hi! I have been developing and distributing Standalone Java Products in my local market for 4 years. My products include, POS Softwares for Retail and whole Sale Businesses and for Food Businesses such as Restaurants and cafes. I use Apache Derby Database which is also known as 'JavaDB' as database … |
The End.