Program:
name=input("\nEnter a name: ")
age=int(input("Enter an age: "))
Quiz1=float(input("Enter Quiz1: "))
print("\n")
print("Name: ",name,"\nAge : ",age,"\nQuiz1 : ",Quiz1)
Output:

an integer value, and your quiz 1 score as a float value. as a string value,...
In Python, please change this function so if someone inputs an invalid age (string, float, number below 0), print "wrong". Use the "isdigit()" function -------------------------- def age_name(): name = input("Enter name:") age = int(input("Enter age:")) print("Hello", name) if(age <= 18): print("Child") elif(age <= 64): print("Adult") else: print("Senior")
1) Write a program that: program starts; declares and initializes to zero an integer variable score; declares and initializes to zero a float variable total; uses a for loop statement with integer x initialized to 1 going 5 iterations hence x<5 incremented by 0; input from keyboard integer score in range of 0 to 99; print on new line input value; adds score to total; switch x equals 3 break default x++; after exiting the loop calculate the average score;...
Write a function in Go that takes as input a float variable and returns two integer values. One integer value which is the floor of the float value and the second integer value which is the ceiling of the float value. Print the result to console.
C++ Write a function parseScores which takes a single input argument, a file name, as a string. Your function should read each line from the given filename, parse and process the data, and print the required information. Your function should return the number of student entries read from the file. Empty lines do not count as entries, and should be ignored. If the input file cannot be opened, return -1 and do not print anything. Your function should be named...
// PLACE YOUR NAME HERE #include <iostream> using namespace std; float findAverage (int [], int); // finds average of all //grades int findHighest (int [], int); // finds highest of all //grades int findFirstFail( int[]); int main() { int grades[100]; // the array holding 100 grades. int numberOfGrades; // the number of grades read. int pos; // index to the array. float avgOfGrades; // contains the average of the grades. int highestGrade; // contains the highest grade. int inderOfFail; //...
1 2 3 #include <iostream> #include <string> using namespace std; float getAmount (float & pricep, string item, int & howmany) 4 5 6 7 8 9 10 11 12 13 14 15 16 = float total priceP; if (item != "book" && price > 200) itemP = "book"; else if (item == "birthday card" && howmanyP >= 10) priceP priceP + 10 / 5; total += priceP; if (price <= 12) itemP = "pencil"; howmany = 50; return total; ب...
1 2 3 #include <iostream> #include <string> using namespace std; float getAmount (float & pricep, string item, int & howmany) 4 5 6 7 8 9 10 11 12 13 14 15 16 = float total priceP; if (item != "book" && price > 200) itemP = "book"; else if (item == "birthday card" && howmanyP >= 10) priceP priceP + 10 / 5; total += priceP; if (price <= 12) itemP = "pencil"; howmany = 50; return total; ب...
1 2 3 #include <iostream> #include <string> using namespace std; float getAmount (float & pricep, string item, int & howmany) 4 5 6 7 8 9 10 11 12 13 14 15 16 = float total priceP; if (item != "book" && price > 200) itemP = "book"; else if (item == "birthday card" && howmanyP >= 10) priceP priceP + 10 / 5; total += priceP; if (price <= 12) itemP = "pencil"; howmany = 50; return total; ب...
1. Assume that cases is the name of a variable with a float value that you want to convert to an integer value. Write a Python expression that converts cases to an integer (throwing away any fractional part) 2. Assume that courseNum is an integer that represents the numeric part of a course number (e.g. 3, 8, 130, 16, 24). Write a Python expression that converts courseNum to an string (i.e. <class 'str'> in Python)