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
Stolb23 [73]
2 years ago
13

What is the output of the following program? If there is any problem, how can

Computers and Technology
1 answer:
Kisachek [45]2 years ago
6 0

Answer:

see below for corrected program.

output is: I live in UAE , Dubai . I go to Dubai National School

You might be interested in
Write a single statement that assigns avg_sales with the average of num_sales1, num_sales2, and num_sales3.
sammy [17]

Answer:

Explanation:

try numpy:

import numpy as np

print(np.average([3, 4, 8]))

output:

5.0

3 0
3 years ago
) Perform error checking for the data point entries. If any of the following errors occurs, output the appropriate error message
emmainna [20.7K]

Answer:

In Python:

entry = input("Sentence: ")

while True:

   if entry.count(",") == 0:

       print("Error: No comma in string")

       entry = input("Sentence: ")

   elif entry.count(",") > 1:

       print("Error: Too many comma in input")

       entry = input("Sentence: ")

   else:

       ind = entry.index(',')+1

       if entry[ind].isnumeric() == False:

           print("Comma not followed by an integer")

           entry = input("Sentence: ")

       else:

           break

print("Valid Input")

Explanation:

This prompts the user for a sentence

entry = input("Sentence: ")

The following loop is repeated until the user enters a valid entry

while True:

This is executed if the number of commas is 0

<em>    if entry.count(",") == 0:</em>

<em>        print("Error: No comma in string")</em>

<em>        entry = input("Sentence: ")</em>

This is executed if the number of commas is more than 1

<em>    elif entry.count(",") > 1:</em>

<em>        print("Error: Too many comma in input")</em>

<em>        entry = input("Sentence: ")</em>

This is executed if the number of commas is 1

   else:

This calculates the next index after the comma

       ind = entry.index(',')+1

This checks if the character after the comma is a number

       if entry[ind].isnumeric() == False:

If it is not a number, the print statement is executed

<em>            print("Comma not followed by an integer")</em>

<em>            entry = input("Sentence: ")</em>

If otherwise, the loop is exited

<em>        else:</em>

<em>            break</em>

This prints valid input, when the user enters a valid string

print("Valid Input")

Note that: entry = input("Sentence: ") <em>is used to get input</em>

4 0
3 years ago
How many levels of full body protective clothing are there? A. Four B. Seven C. Six D. Two
Verdich [7]
The answer is A. Four
4 0
3 years ago
Read 2 more answers
How efficient would a 6-bit code be in asynchronous transmission if it had 1 parity bit, 1 start bit, and 2 stop bits?
Lana71 [14]
How efficient well if we are transmitting 6bits and we need 10 to transmit the 6 bits that would be 6/10 = .6 = 60% efficient.
7 0
3 years ago
A _____ model is one that is automatically adjusted based on changing relationships among variables.
BabaBlast [244]

Answer: dynamically modified model

Explanation:

7 0
1 year ago
Other questions:
  • USB keys can store terabytes of data. Of the five key factors that contribute to the increasing vulnerability of organizational
    13·1 answer
  • You just brought a new hard drive for your computer. U plan to use this as a secondary hard drive to store all your uma files. O
    10·1 answer
  • In C please:
    5·1 answer
  • Que son los sistemas de control con retroalimentacion
    10·1 answer
  • Consider a multidimensional array A stored in row-major order with 22 rows and 6 columns whose subscripts start at 0. If each el
    8·1 answer
  • In C, how could I use a command line input to remove certain characters from an existing string? For example, if I have string '
    8·1 answer
  • Site at least 3 articles of impact of internet that affect in our daily lives.
    15·1 answer
  • If you can photoshop please text me i need help for my digital media class 7862381441
    9·1 answer
  • Write a class Bug that models a bug moving along a horizontal line. The bug moves either to the right or left. Initially, the bu
    13·1 answer
  • Imagine an everyday scenario in which you are using the internet: downloading a file, uploading a photo, checking your email, et
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!