Exercise #3: (Symbol) Write a nested loop that asks the user for symbol (store in a char) and a number. The loop should output a rectangle (or square) of the character that is of the height and width of the number. E.g., if I input 4 and *, I would get:
****
****
****
****
ch = input("Enter a symbol: ")
n = int(input("Enter a number: "))
for i in range(n):
for j in range(n):
print(ch, end='')
print()
Exercise #3: (Symbol) Write a nested loop that asks the user for symbol (store in a...
Using the nested loop in C++ to finish the program
//test scores. //It asks the user for the // number of students and //the number of test scores //per student. // Calc. and display average score // for each TEST 2 4 6 7
Write an interactive program exam1 that loops Loop and asks the user at the end of the loop to continue or not Ask the user to enter an alphanumeric US phone number Read the line of text from the screen Check if the entered string is a valid phone number using isValid(Line) if it is valid number { call toNumeric(line) to convert it to digits print Line after conversion } bool isValid(char line[]) { //st must have 10 digits and...
Im lost I need help seriously
Write a javascript that asks the user to input a number. The number is then passed into a function you write that contains a loop. The loop will loop the number you passed into the function and print out the word "CSU" that many times. For instance, if l entered 3, the function would print out "CSU CSU CSU". (20 points) 5.
Write a javascript that asks the user to input a number. The...
C++ coding answer
5. Write a program that asks the user for a positive integer value. The program should use a loop to get the sum of all the integers from 1 up to the number entered. For example, if the user enters 50, the loop will find the sum of 1, 2, 3, 4, ... 50. Input Validation: Do not accept a negative starting number.
21 Write a program that asks the user to input the length and breadth of a soccer field, and then computes and returns the number of square meters of grass required to cover the field The formula for the area is the product of length and breadth (5) 22 The following program uses the break statement to terminate an infinite while loop to print 5 numbers Rewrite the program to use a while loop to display numbers from 1 to...
Write an infinite while loop that asks the user for their username and password. The loop only stops if the username and password for the user are correct. There are only 2 users: the first user’s username is user123 and their respective password is passwrd1, the second user’s username is user234 and their respective password is passwrd2. Expected output/input when loop is to stop: Enter username: user123 Enter password: passwrd1 Welcome user123 !Expected output/input when loop continues:Enter username: user234 Enter...
Write a program that asks the user to enter a string and then asks the user to enter a character. The program should count and display the number of times that the specified character appears in the string. python programming
Java Letter Counter: Write a program that asks the user to enter a string, and then asks the user to enter a character. The program should count and display the number of times that the specified character appears in the string. Must use a do while loop and a counter!!!!
I need help with
Write an application that allows user to input the height and width of a rectangle. It should output the area and perimeter of the rectangle. Use methods for entering the values, performing the computations, and displaying the results. Results should be formatted with one position to the right of the decimal and printed number aligned in a tabular display.
Write a piece of code that enters a loop and asks the user to input anon-negative number. If the user enters a negative number, the code goes back into the loop and asks the user again to enter a non-negative number. The code keeps going back into the loop until the user enters a non-negative number. Notice that the code enters the loop at least once. This is an application of 1 to N loop.Therefore, use a Do While statement.