Computers and Technology
Computers and Technology, 02.02.2021 05:20, igtguith

Write a program that prompts the user to enter a fraction in the following format (x/y). You may assume that the user will input numbers and a slash, but your program should deal with spaces. Use String methods to parse out the numerator and denominator (e. g. indexOf(), trim(), substring() etc.) Once you have the numerator and denominator, your program will determine whether the number is a proper fraction or an improper fraction. If it is a proper fraction, display the number. If not, reduce it to a mixed fraction or to an integer (see sample output below).

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:00, briannaleiigh
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
image
Computers and Technology, 23.06.2019 21:50, Trinhphuongtran
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, ladybuggirl400
@josethesolis i need can anyone text me and follow me
Answers: 1
image
Computers and Technology, 24.06.2019 16:50, Ameilasmickle15
How many types of string types does python support?
Answers: 1
Do you know the correct answer?
Write a program that prompts the user to enter a fraction in the following format (x/y). You may ass...

Questions in other subjects:

Konu
Mathematics, 02.09.2021 21:00
Konu
Mathematics, 02.09.2021 21:00
Konu
Mathematics, 02.09.2021 21:00