
kindly just answer part 1 and 2 i don't need whole code in c++
Answer 1-
def convert24(str1):
if str1[-2:] == "AM" and str1[:2] == "12":
return "00" + str1[2:-2]
elif str1[-2:] == "AM":
return str1[:-2]
elif str1[-2:] == "PM" and str1[:2] == "12":
return str1[:-2]
else:
return str(int(str1[:2]) + 12) + str1[2:8]
print("10:54 AM ")
Answer 2-
# Python program to convert time
def convert24(str1):
if str1[-2:] == "AM" and str1[:2] == "12":
return "00" + str1[2:-2]
elif str1[-2:] == "AM":
return str1[:-2]
elif str1[-2:] == "PM" and str1[:2] == "12":
return str1[:-2]
else:
return str(int(str1[:2]) + 12) + str1[2:8]
print(convert24("12:54 AM "))
kindly just answer part 1 and 2 i don't need whole code in c++ but ime...
This is a c# assignment Please do not post just the code, I don't even know how to start the project. Please explain step by step how I could complete this assignment. Thank you for your time! Create a database that stores baseball player information. You will have the following columns. You will need to have the ability to add rows and display the records. You may use LINQ or Given example using an access accdb file... Name string Batting...
Hi , I need your help please. I don't know how to do this . I
posted this question before and some sweet person did all this work
below but I don't really understand ( i also don't know if it's
right)and he also did the GRAPH on paper .I Need the GRAPH on EXCEL
PLEASE.
If you kindly maybe type it so I can fill this chart that would
be really great ( I just gotta show some work...
What did I do wrong with this C++ code? Assume that we don't need to ask users for the number of students. #include <iostream> #include <iomanip> using namespace std; int main() { float *grades; // a pointer used to point to an array int size; int count = 0; // track the number of grade/student float grade; // the grade of a student float average, total; // average grade and total grades //**************start your code here************************ cout<<"How many student grades...
[C#] I need to convert this if/else statements into Switch I have the code for the if/else but now need to turn it into a switch. The Console.WriteLine and all that is fine. I just need to convert the if/else. int x1, x2, y1, y2; Console.WriteLine("What is smallest value of x:"); x1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("What is largest value of x:"); x2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("What is smallest value of y:"); y1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("What is largest value of y:"); y2 =...
Java I just need the answer to the questions, not the whole implemented code please You have an object of the RandomAccessFile class named empRaf. It refers to a physical file that contains a company's employee records. Each employee record has: an int field named empID which points to its location in the file a 20 character last name a 15 character first_name a hire date stored as an int a 3 character job code The empID values begin at...
use for loop only, c++ i have most of it done, I just don't know
how to go by 10 on this line:
for(int i = start;i<=end;i++)
so you don't have to do the whole thing, just let me know how to
go by 10 on the table.
4. Enter the table size (start, end): 10 100 10 XX.XX XX.XXXX.XX 20 xx.xxXX. 100 xX.xxxX.xxxx.xx € (Euro), £ (British Pound), ¥ (Yen)
I am given an input file, P1input.txt and I have to write code to find the min and max, as well as prime and perfect numbers from the input file. P1input.txt contains a hundred integers. Why doesn't my code compile properly to show me all the numbers? It just stops and displays usage: C:\> java Project1 P1input.txt 1 30 import java.io.*; // BufferedReader import java.util.*; // Scanner to read from a text file public class Project1 { public static...
Need some assistance of
reorganizing this whole program. I have the right code for
everything I just need help on putting all the codes in the right
spot so it can come out to the correct output.
output is supposed to look like this:
1 \\ user inputs choice to convert 12 to 24
8 \\ user inputs 8 for hours
30 \\ user inputs 30 for minutes
20 \\ user inputs 20 for seconds
AM \\ user inputs AM...
Part 1: Python code; rewrite this code in C#, run the program and submit - include comments number= 4 guesscount=0 guess=int(input("Guess a number between 1 and 10: ")) while guess!=number: guesscount=guesscount+1 if guess<number: print("Your guess is too low") elif guess>number: print("Your guess is too high") else: print("You got it!!") guess=int(input("Guess again: ")) print("You figured it out in ",guesscount," guesses") Part 2: C++ code; rewrite the following code in C#. Run the program and submit. - include comments #include <iostream> using...
You don't need to prove 10.3.3 or the theorem 10.3.2. You just
need to answer the 10.3.4 part (c) by using 10.3.3 and 10.3.2.
10.3.4·This exercise shows that the center of An is trivial for all n 4. (a) Compute that the center of A4 is se) (b) Show that for n 2 4, An is not abelian. (c) Use Exercise 10.3.3 and Theorem 10.3.2 to show that if n 5, then the center of An is either {e) or...