1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zina [86]
3 years ago
8

3.6 code practice (edhesive)

Computers and Technology
1 answer:
Pie3 years ago
4 0

largest = int(input("Enter a number: "))

print("Largest: {}".format(largest))

i = 0

while i < 5:

   num = int(input("Enter a number: "))

   if num > largest:

       largest = num

   print("Largest: {}".format(largest))

   i += 1

I hope this helps!

You might be interested in
Write a program (C++) that reads a number between 1,000 and999,999 from the user where the user enters a comma in the input.Then
mr Goodwill [35]

<u>C++ program to print the digit without a comma </u>

#include<iostream>

#include<string>

using namespace std;

void commaremoval(string num)  /*Defining function commaremoval with parameter num of string type*/

{  

string  s=num;

for(int i=0; i< s.length();i++)

   {

    if(s[i]!=',') /*Checking whether the string doesn't contain ' ,' */

       cout<<s[i];  //Printing Output without comma

   }  

}

//driver function

int main()

{

string num;

cout<<"Enter a digit between 1,000 and 999,999:"<<endl; /*taking input from user*/

cin>>num;

commaremoval(num); //calling function

return 0;

}

<u>Output</u>

Enter a digit between 1,000 and 999,999:  22,343

22343

7 0
3 years ago
Extend the flow properties and definitions to the multiple-source, multiple- sink problem. Show that any flow in a multiple-sour
Mkey [24]

Answer:

We add a super source s and add a directed edge (s, si) with capacity c(s, si) = ∞ for each i = 1, 2, . . . , m. We also create a new super sink t and add a directed edge (ti, t) with capacity c(ti, t) = ∞ for each i = 1, 2, . . . , n. The single source s simply provides as much flow as desired for the multiple sources si, and the single sink t likewise consumes as much flow as desired for the multiple sinks ti.

Because the virtual edges of s and t can consume as much flows as they want, they don't influence the actual edges.

Explanation:

7 0
4 years ago
Suppose you have a 12-hour clock on a very fancy chair (noon is 12 PM and midnight is 12 AM). Write a C++ program that reads in
agasfer [191]

Answer:

#include<iostream>

#include<cmath>

#include <ctime>

using namespace std;

int main()

{

       time_t t = time(NULL);

tm* timePtr = localtime(&t);

cout << "seconds= " << (timePtr->tm_sec) << endl;

cout << "minutes = " << (timePtr->tm_min) << endl;

cout << "hours = " << (timePtr->tm_hour) << endl;

cout << "day of month = " << (timePtr->tm_mday) << endl;

cout << "month of year = " << (timePtr->tm_mon)+1 << endl;

cout << "year = " << (timePtr->tm_year)+1900 << endl;

cout << "weekday = " << (timePtr->tm_wday )<< endl;

cout << "day of year = " << (timePtr->tm_yday )<< endl;

cout << "daylight savings = " <<(timePtr->tm_isdst )<< endl;

       cout << endl;

       cout << endl;

       cout << "Date     " <<(timePtr->tm_mday)<<"/"<< (timePtr->tm_mon)+1 <<"/"<< (timePtr->tm_year)+1900<< endl;

       cout << "Time     " << (timePtr->tm_hour)<<":"<< (timePtr->tm_min)<<":"<< (timePtr->tm_sec) << endl;  

   return 0;

}

Explanation:

4 0
3 years ago
The ____ allows 127 different devices to connect to a computer via a single usb port on the computer’s system unit
hram777 [196]
<span>I'm 100% sure that correct answer should look like this: The USB standart port allows 127 different devices to connect to a computer via a single usb port on the computer’s system unit.</span>
4 0
3 years ago
I.C.T
oee [108]

Soft and hard copies in my opinion

8 0
3 years ago
Read 2 more answers
Other questions:
  • Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
    13·1 answer
  • Write a complete function called lowestPosition() which takes as array (of double) and the number of elements used in the array
    9·1 answer
  • A technician selected the GUI interface on a wireless router and added a DNS address of 208.67.220.220. The technician then imme
    6·1 answer
  • The weight of your car will also affect its_____.
    13·2 answers
  • Brian is a computer engineer who writes security software for a banking system. The
    13·1 answer
  • FIFTY POINTS IF YOU CAN HELP ME!!!!
    11·1 answer
  • Why do we need to know the different Networking Devices?​
    10·1 answer
  • 2. What is the first part of the 3D printing process ?
    11·1 answer
  • I need help ASAP which option is an example of a resource that would most likely become a constraint in building a game
    7·2 answers
  • Can yall help me pls
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!